Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Formating For "Time" 1

Status
Not open for further replies.

jamason07

IS-IT--Management
Aug 28, 2003
46
US
I have two fields in a form to conditionally format to change color when the field is less than or great than the current date....ie. [Date]+60<Date(). I've been trying to do the same thing for my time field but it is not recognizing the addition of hours....ie. [Time]+1<Time(). I've tried using the 24 hour clock 00:00:00 but that only gives me an expression error. I've tried a variety of formats. Does anyone know how the conditional formating reads time to increase by hours and minutes? It seems like a really easy problem but I am stumped today!

Thanks!

Jeffrey
 
Jeffrey,
MS stores date/time fields in such a way that the integer part of the field is the date, and the decimal part of the field is the time. So, when you add 1, you are not having any effect on the time portion of the field (the decimal part represents seconds since midnight).

I think if you check out the DateAdd function (it works with time, too), you will find what you are looking for.

Tranman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top