D
Doug
I have an Access 2002 .adp application that uses the NOW() function a lot to
update datetime fields in SQL Server. The problem I have just run into is
that some of my users are Canadian and have selected the Regional Language
Preference of English (Canada). On those workstations when the code below is
executed SQL Server generates an error because the date is in the wrong
format:
strsql = "update tbluser set lastcomputername = '" & scomputername & _
"', lastlogin = '" & now() & "' where userid = '" &
Me.username & "'"
cn.Execute strsql
Now() = '21/06/2007 hh:mm:ss' instead of '06/21/2007 hh:mm:ss' and SQL
doesn't like it. I tried to create a datetime variable and set that = now(),
but it is still in the Canadian Date format.
Any suggestions on how to get around this?
update datetime fields in SQL Server. The problem I have just run into is
that some of my users are Canadian and have selected the Regional Language
Preference of English (Canada). On those workstations when the code below is
executed SQL Server generates an error because the date is in the wrong
format:
strsql = "update tbluser set lastcomputername = '" & scomputername & _
"', lastlogin = '" & now() & "' where userid = '" &
Me.username & "'"
cn.Execute strsql
Now() = '21/06/2007 hh:mm:ss' instead of '06/21/2007 hh:mm:ss' and SQL
doesn't like it. I tried to create a datetime variable and set that = now(),
but it is still in the Canadian Date format.
Any suggestions on how to get around this?