| 
 Posted by zerbie45 on 03/01/06 19:30 
I have a high number of computers that at logon write some information 
to a sql 2005 database. Information such as computer name, user name, 
logon date and logon time are entered. 
 
Because computers use different regional options, I notice that queries 
to this database return inconsistent results due to different date 
formatting. For example I see computers entering 1/3/2006 and 1/3/6 or 
1/3/06. 
 
How can I modify my query so that it reformats the date. This is my 
current query I execute from within an ASP application: 
 
RS.Open "Select * from PCLogs.dbo.logs WHERE Note = '" & 
Request.Form("date") & "' ", dbConn, 1 
 
The date is a variable that refers to a dd/mm/yyyy format. The date 
column is of type text. 
 
I'm a novice in SQL so any help would be greatly appreciated ! 
TIA and Regards
 
[Back to original message] 
 |