Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date/time sort using date only

Status
Not open for further replies.

nfgcgrb

Technical User
Jul 29, 2001
1
US
I need to query an Access data base to sort on a date/time, from an ASP page in SQL query format, then seconday sort by field 1, field, 2. I only want to order by the date part of the date/time field. I'm getting:

date/time fld1 fld2
07/26/2001 8:00 AM yes no
07/26/2001 8:01 AM no no
07/26/2001 8:02 AM yes yes
07/26/2001 8:03 AM no yes

I want to get
date fld1 fld2
07/26/2001 yes no
07/26/2001 yes yes
07/26/2001 no no
07/26/2001 no yes

I simply want to get the time out of the picture for a single report, but need it as a date/time for other queries.

Thank you

Mike
 

Try this query.

Select format(datetimecol, "short date") As DateOnly, fld1, fld2 From tbl Order By format(datetimecol, "short date") Terry Broadbent

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top