Thursday, 22 August 2013

Change date format in SQL for ASP

Change date format in SQL for ASP

I have the following code:
"SELECT top 1 * FROM CensusFacility_Records WHERE Division_Program =
'Division 1' AND JMS_UpdateDateTime = '" & date & "'"
The date format in column JMS_UpdateDateTime is: 8/22/2013 12:00:07 AM How
can I make sure that my "date" in the query is converted to the correct
time format?
My date variable in my SQL query is a real/date time. I would like for it
to match the format within the JMS_UpdateDateTime field.

No comments:

Post a Comment