G
Guest
I am creating a .ASP for a database that I cannot change.
I am trying to query the database to fill 2 listboxes with the date of the
record. (i.e. mm/dd/yyyy) The date field is of the date/time type. There
are a few records with the same date, but different times. My goal is to
just list one instance of the date in the listboxes in chronological order.
This is the query I have so far,
"SELECT DISTINCT Left(TimeStamp,InStr(TimeStamp,' ')) AS DateOfTest FROM
TestTable ORDER BY DatePart('yyyy',TimeStamp)"
The resulting error is ...
ORDER BY clause (DatePart('yyyy',TimeStamp)) conflicts with DISTINCT.
Any help is immediately appreciated.
I am trying to query the database to fill 2 listboxes with the date of the
record. (i.e. mm/dd/yyyy) The date field is of the date/time type. There
are a few records with the same date, but different times. My goal is to
just list one instance of the date in the listboxes in chronological order.
This is the query I have so far,
"SELECT DISTINCT Left(TimeStamp,InStr(TimeStamp,' ')) AS DateOfTest FROM
TestTable ORDER BY DatePart('yyyy',TimeStamp)"
The resulting error is ...
ORDER BY clause (DatePart('yyyy',TimeStamp)) conflicts with DISTINCT.
Any help is immediately appreciated.