in access, how do i pull out data that contains a time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

if i have a date/time column, and i wanted to pull out all in the field that
contains 12:00 am, how would i set up that query?
 
thanks

Douglas J. Steele said:
WHERE TimeValue([MyDateTimeField]) = #00:00:00#

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


season said:
if i have a date/time column, and i wanted to pull out all in the field
that
contains 12:00 am, how would i set up that query?
 
Hi.
if i have a date/time column, and i wanted to pull out all in the field that
contains 12:00 am, how would i set up that query?

If you have any records without a date/time, then you'll need the following
query:

SELECT TimeValue(SomeDate) AS TOD
FROM tblStuff
WHERE (TimeValue(SomeDate) = #00:00:00#) AND ISNULL(SomeDate) = FALSE;

.. . . where SomeDate is the Date/Time field, and tblStuff is the name of the
table.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
 
Back
Top