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

SQL Select statement with dates (British!!) 1

Status
Not open for further replies.

gordonl

Programmer
Mar 15, 2001
17
0
0
GB
I am using VB and Access Database. I am using ADO to connect the two.

The select criteria is based on a datepicker control, and because the computer has a british set up, the value of this control is stored as day/month/year.

However, when I use this value in an SQL statement it does not work. I have disovered I can only get the desired effect by first changing it to month/day/year (the american format).

My question is then does the SQL language only work with American dates and VB work with whatever the settings are specified by the operating system.
 
It assumes american. Its always best to make any date completely obvious by formatting them as dd / mmm yyyy. Otherwise you will things work for a while, and then it all gets terribly confused over 4th April or is it 3rd March. If you format it with the month name, it won't get muddled. Peter Meachem
peter@accuflight.com
 
Very Good Peter, Thank you. I have tried it and it now works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top