Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Query Date Formatting 1

Status
Not open for further replies.

bholm

Programmer
Aug 28, 2001
17
0
0
US
How do you format a date in a query against a Access db?
I need to know the function to use. In Oracle you have the TO_DATE(date,mask) function. What is the equivalent in Access land?

Here is my query attempt that failed:
SELECT *
FROM classes
WHERE TO_DATE(ClassDate,'mm/dd/yy') = TO_DATE(
(SELECT ClassDate
FROM classes
WHERE id=#Form.ClassSel#),'mm/dd/yy')
 

Use the Format function.

Format(ClassDate, "mm/dd/yy") Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top