Convert() Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database which contains 2 char field
LDate char(10) //format (mm/dd/yyyy
LTime char(10) //format (HH:MM:SS

I'm writing an application to sort the date. However, when I call

Select Convert(DATETIME,LDate + ' ' + LTime,101) as 'LDateTime' from Table1 order by LDateTime des

It does not run with MS Access but it works fine with MS SQL Server
What is the above equivalent when using MS Access? Does MS Access have CONVERT()
Can you suggest me some good online book/reference that I can understand the different SQL syntax in Access or SQL Server

Best regards
Grace
 
Try
SELECT CDate([LDate] & " " & [LTime]) As LDateTime
FROM Table1
ORDER BY CDate([LDate] & " " & [LTime]) DESC;

--
Duane Hookom
MS Access MVP


Grace said:
I have a database which contains 2 char fields
LDate char(10) //format (mm/dd/yyyy)
LTime char(10) //format (HH:MM:SS)

I'm writing an application to sort the date. However, when I call:

Select Convert(DATETIME,LDate + ' ' + LTime,101) as 'LDateTime' from Table1 order by LDateTime desc

It does not run with MS Access but it works fine with MS SQL Server.
What is the above equivalent when using MS Access? Does MS Access have CONVERT()?
Can you suggest me some good online book/reference that I can understand
the different SQL syntax in Access or SQL Server.
 
Back
Top