Date Fields

C

CaptPhil

In my database, I have a date and time field. Using conditional formatting, I
would like to highlight this date on a form when the entered date = today.
The condition "must equal Date()" works if my date field only contains a
date. If my field contains a date and time, the solution does not work. I
think it has to do with the Date function equaling the date at 00:00 so it is
not a perfect match? I need the function to ignore the time in my field.
 
F

fredg

In my database, I have a date and time field. Using conditional formatting, I
would like to highlight this date on a form when the entered date = today.
The condition "must equal Date()" works if my date field only contains a
date. If my field contains a date and time, the solution does not work. I
think it has to do with the Date function equaling the date at 00:00 so it is
not a perfect match? I need the function to ignore the time in my field.

Using Conditional Formatting, set Condition1 to
Expression Is.
Set the Expresion to:
DateValue([DateField] = Date()
 
C

CaptPhil

fredg said:
In my database, I have a date and time field. Using conditional formatting, I
would like to highlight this date on a form when the entered date = today.
The condition "must equal Date()" works if my date field only contains a
date. If my field contains a date and time, the solution does not work. I
think it has to do with the Date function equaling the date at 00:00 so it is
not a perfect match? I need the function to ignore the time in my field.

Using Conditional Formatting, set Condition1 to
Expression Is.
Set the Expresion to:
DateValue([DateField] = Date()

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Thanks, Simplicity, just what I wanted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top