Default value for NOW()

G

Guest

I have a table that has a date field set to Short DATE with a default value
of NOW().
When I enter data in my form, it always shows the time also, even tho the
form is set for the same NOW and date format.

When I do a search on the date field, I get no records returned because I'm
not entering the time also.

Is there another default value for NOW() I should be using?
 
W

Wayne Morgan

Donna,

The reason for this is because Format only changes the way the item is
displayed, not what the item actually is. Since you are using Now(), you are
getting the current date and time. If you only want the current date, try
the Date() function instead.

To search by date on a field containing date and time you can use a
calculated field in a query to format the value to date only and then do the
search on that field.

Example Field:
DateOnly: Format([Table1].[DateField], "Short Date")
 

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