Time on date

A

acss

I have a date field that is set at short date and when a query is run is
fills in the field with date and time. How does one prevent the time from
being included?
 
K

kingston via AccessMonster.com

Check your query and make sure the format of the output column in question is
set correctly.
 
J

Jerry Whittle

Short Date, General Date, etc., are how the dates are formatted; NOT how they
are stored.

If you don't want to see the time portion of the field in a query, you need
to format in the query.
Debug.Print Format(Now(),"Short Date")
 
A

acss

Thanks. The data comes from a union query so how would i set this up since
the only edit region is SQL?
 
A

acss

Hi Jerry,

This is what i am receiving in the query when it is run 7/3/2007 1:24:40 PM
and in the fields default value within the form i have =Now() Is this the
coorect thing to do if you want the current date and not the time?
 
J

Jeff Boyce

If you are using "Now()", you are telling Access to store a date/time value.

Consider using "Date()" instead, if you only want the date value. (NOTE:
Access will store "00:00:00" - midnight - as the time portion, but will
allow you to search on date-only values this way).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jerry Whittle

If you only want the date, use the Date() function instead of Now().

If the Date() function causes an error, you have a references problem which
is usually easy to fix.
 

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