
October 17th, 2003, 06:02 PM
|
|
Junior Member
|
|
Join Date: Oct 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Date function & MySQL
Is it possible to change ASP's date function to a MySQL compliant (ie. year first; 2003/8/17) style without a lot of code?
Maybe I'm mis-guided. I have a website built in ASP and using MS SQL. I'm converting it all to MySQL, but I'd rather not have to rewrite all the instances where I do something like this...
ASP:
Code:
Query = "SELECT SUM(Total) AS Totals FROM orders WHERE create_date BETWEEN '" & date & "' AND NOW()"
Results in:
Code:
"SELECT SUM(Total) AS Totals FROM orders WHERE create_date BETWEEN '10/17/2003' AND NOW()"
...which MySQL inturprets completly wrong. It ends up SUM'ing up the entire table of orders.
Am I missing something? Any help would be great. TIA!
-Ian
|