SQL Server 2000 Datatime field in Access

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.
 
V

Van T. Dinh

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
 

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

Top