Running a Query Date

G

Guest

There is a field in a table that give a date time stamp. I want to be able
to do a query on just the date part of the field. Is there a way to extract
just the date and not the time. Or can you separte the two by using a query
into two seprate fields.

The field is called "Status Change"
The format is "Short Date" (only to display
This is what is in the field: 5/9/2007 8:25:30 AM

Just to give you background. I am running the report from a call center
program. Then importing the data for the day into access to run reports. So
it gives me the field in date time. You can't seprate it in the call center
program.
 
G

Guest

Kat,

Use the DateValue( ) function. There is also a TimeValue( ) function if you
want to strip out just the time.

HTH
Dale
 
J

John Spencer

In the query grid view:


Field: JustTheDate: DateValue([Status Change])



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
G

Guest

Kat,

Per your request.

Select [Status Change], DateValue([Status Change]) as JustTheDate
From yourTable

Or, to select all of the records that were entered in yourTable today,

Select * FROM yourTable
WHERE DateValue([Status Change]) = Date()

HTH
 

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

Similar Threads


Top