sorting by datetime
-
-
Dear all, I am cuurrently using DAO to access my oracle DB, i have a datetime field and would like to sort by the records according to dates/time. Anybody have any method sorting Dates or time using DAO? your help will be greatly appreciated!!!!:rolleyes:
-
Why don't you specify your sorting request in your SQL statement? Like this: "SELECT ... FROM ... WHERE ... ORDER BY (datetime_field_name)"
-
Why don't you specify your sorting request in your SQL statement? Like this: "SELECT ... FROM ... WHERE ... ORDER BY (datetime_field_name)"
For those using DAO or mircosoftjet engine to sort date i found the solution Hope this will help you all!!! SELECT * FROM tblInvoices WHERE CustomerID = 1 AND InvoiceDate > #01/01/98# Note that the date string is enclosed in number signs (#). More details , http://www.abspos.net/HelpRT/Microsoft Jet SQL - Fundamentals.htm