D
Duncs
I have a table that records entry & exit date / time into a database.
In an SQL query within the form's Open evend, I have the following:
strSQL = "INSERT INTO tblUsers (DateIn, ComputerID, UserName,
WhereLoaded) " & _
"VALUES(#" & Format(Now(), "dd/mm/yyyy hh:mm:ss") &
"#, '" & _
Environ("computername") & "', '" & Environ("username")
& "', '" & _
CodeProject.FullName & "');"
DoCmd.RunSQL strSQL
This works fine, apart from the dates. These are stored in US format
rather than UK. This results in some confusion. For example, if I
load the database on 9th June 2010, my date in will be recorded as
06/09/2010. However, if I load it on 21st June, the Date will be
recorded as 21/06/2010. The DateIn field is defined as a GeneralDate.
Any ideas?
Duncs
In an SQL query within the form's Open evend, I have the following:
strSQL = "INSERT INTO tblUsers (DateIn, ComputerID, UserName,
WhereLoaded) " & _
"VALUES(#" & Format(Now(), "dd/mm/yyyy hh:mm:ss") &
"#, '" & _
Environ("computername") & "', '" & Environ("username")
& "', '" & _
CodeProject.FullName & "');"
DoCmd.RunSQL strSQL
This works fine, apart from the dates. These are stored in US format
rather than UK. This results in some confusion. For example, if I
load the database on 9th June 2010, my date in will be recorded as
06/09/2010. However, if I load it on 21st June, the Date will be
recorded as 21/06/2010. The DateIn field is defined as a GeneralDate.
Any ideas?
Duncs