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 IamaSherpa 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 conversion

Status
Not open for further replies.

kjacarver

Programmer
Jun 29, 2001
6
GB
I'm having a problem converting the British date format to the American date format within an SQL query. I use the Month and Year methods to attain the month and year values from the two variables - strFromDate and strToDate. However, I'm not sure of the syntax to use in the query. Here is the code, but if anyone has any ideas they would be appreciated greatly.

strQuery = strQuery & "WHERE Data = 'ORDER' "
strQuery = strQuery & "AND Input_Date BETWEEN month('" & strFromDate & "') /01/ year('" & strFromDate & "') AND month('" & strToDate & "') /01/ year('" & strToDate & "') "
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top