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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JDBC Date Format

Status
Not open for further replies.

tdion

MIS
Dec 18, 2003
61
US
Trying to create an SQL statement that queries the simple date format (mm/dd/yyyy) in Access 2002 (using ODBC driver)...

Have tried everything!!!

Best guess has been:

SELECT * FROM TABLE WHERE DateField = #2005-12-31#

JDBC just doesn't recognize the format and ignores the statement! There is virtually no reference to this on the web. :(
 
typo above.... #2005-12-31# should be #2005-31-12#

HEEEELP ;)
 
If Jet syntax is invoked:
SELECT * FROM TABLE WHERE DateField = #2005-12-31#
If ANSI syntax is invoked:
SELECT * FROM TABLE WHERE DateField = '2005-12-31'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top