Running a Query Date

  • Thread starter Thread starter Guest
  • Start date Start 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.
 
Kat,

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

HTH
Dale
 
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
'====================================================
 
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
 
Back
Top