N
Nicolae Fieraru
Hi All,
I live in Australia and I have Access installed on my computer. Regional
settings are set to Australian Standards (dd/MM/yyyy)
I try to insert the current date into a table from an asp page.
I set the date format with
Session.LCID = 3081
I use SQL expressions to enter the current date into a database. I noticed
that there is a difference between
objConn.Execute "Insert Into tbDate(Date1) " & "Values ('" & Now() & "')"
and
strQ2 = "Select * From tbDate Where Index = " & maxindex
objRS2.Open strQ2, objConn, 2, 2
objRS2("Date1") = Now()
objRS2.Update
The second sequence updates the date to the right value in the database.
The first one reverses the day and month. I read extensively on the internet
and I tried almost any advice I found, but none seem to make the first
expression to do the right thing. (I tried using #, or to format the date to
ISO standard - which Access doesn't accept!). I could do some silly thing,
like to insert the date with the first expression and then to correct it
with the second one, but I am sure somebody should have solved this problem
in a better way.
Any idea would be appreciated
Regards,
Nicolae
I live in Australia and I have Access installed on my computer. Regional
settings are set to Australian Standards (dd/MM/yyyy)
I try to insert the current date into a table from an asp page.
I set the date format with
Session.LCID = 3081
I use SQL expressions to enter the current date into a database. I noticed
that there is a difference between
objConn.Execute "Insert Into tbDate(Date1) " & "Values ('" & Now() & "')"
and
strQ2 = "Select * From tbDate Where Index = " & maxindex
objRS2.Open strQ2, objConn, 2, 2
objRS2("Date1") = Now()
objRS2.Update
The second sequence updates the date to the right value in the database.
The first one reverses the day and month. I read extensively on the internet
and I tried almost any advice I found, but none seem to make the first
expression to do the right thing. (I tried using #, or to format the date to
ISO standard - which Access doesn't accept!). I could do some silly thing,
like to insert the date with the first expression and then to correct it
with the second one, but I am sure somebody should have solved this problem
in a better way.
Any idea would be appreciated
Regards,
Nicolae