Querying date/time access

Coaster_brook_trout
Coaster_brook_trout used Ask the Experts™
on
I have a field in an access database that looks like this "05/08/1986 11:30:00 AM" and I want to query it to just get this, "05/08/1986".

How do I do that?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
mbizupNerd
Most Valuable Expert 2012
Top Expert 2013

Commented:
On your form, set the format property of that textbox to "Short Date"


You can also set the format property of the field in the underlying table or in the query itself to Short Date
You may use FORMAT function:

FORMAT(YourDateTime, "mm/dd/yyyy")

More info: http://www.techonthenet.com/access/functions/date/format.php
Nerd
Most Valuable Expert 2012
Top Expert 2013
Commented:
To do this right in the query...Short Date
mbizupNerd
Most Valuable Expert 2012
Top Expert 2013

Commented:
Coaster_brook_trout,

Was there something we should have done to make the responses more clear?

Take a look at EE's grading guidelines here:
http://support.experts-exchange.com/customer/portal/articles/481419-what-grade-should-i-award-?b_id=44

A B grade means the solution given lacked some information or required you to do a good amount of extra work to resolve the problem. When closing the question, the asker should explain why a B grade was awarded.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial