SQL Server 2000 Datatime field in Access

  • Thread starter Thread starter Roger Lee
  • Start date Start date
R

Roger Lee

I am using Access 97 to retrieve data from a SQL 2000
Server. And I have to sort by the Date Time field in the
SQL Server.

However, I only want to sort according to the Date but not
the Time component in that field.

Is it possible for me to get rid of the Time component in
an Access 97 query. I have tried
1) Datepart ("dd/mm/yyyy", OrderDate) and
2) Convert (OrderDate, "dd/mm/yyyy") but Access 97 says
that there is a syntax error.

Your advice is sought.
 
Use DateValue() function in the Query to get rid of the time component.

From Debug windows:

?DateValue(#01/07/2003 18:30:00#)
07/01/2003
 
Back
Top