Headshot001
Programmer
I have my pages hosted on a US server however I am in Australia. I am trying to get the Date & Time to write / read in my local time format. I have looked around and found out about LCID however it does not seem to be helping this issue.
My code is as follows
---------------------
first1=rsProducts.Fields.Item("First".Value
last1=rsProducts.Fields.Item("Last".Value
mobile1=rsProducts.Fields.Item("Mobile".Value
message1=rsMessage.Fields.Item("Message".Value
Session.LCID = 3081
date1=Date()
time1=Time()
set comSMSLog = Server.CreateObject("ADODB.Command"
comSMSLog.ActiveConnection = MM_smsLog_STRING
comSMSLog.CommandText = "INSERT INTO SMSLog (First, Last, Mobile, Message, TimeSent, DateSent) VALUES ('"&first1&"', '"&last1&"', '"&mobile1&"', '"&message1&"', '"&time1&"', '"&date1&"')"
comSMSLog.CommandType = 1
comSMSLog.CommandTimeout = 0
comSMSLog.Prepared = true
comSMSLog.Execute()
-----------------------------
However - when I read the date and time coming back in using this...
<%=(rsLogSearch.Fields.Item("TimeSent".Value)%></td>
<%=(rsLogSearch.Fields.Item("DateSent".Value)%></td>
I still get the US times and dates. Has anyone got any advice they could offer? It would be greatly appreciated.
NB: I cannot alter the global.asa file on my server.
My code is as follows
---------------------
first1=rsProducts.Fields.Item("First".Value
last1=rsProducts.Fields.Item("Last".Value
mobile1=rsProducts.Fields.Item("Mobile".Value
message1=rsMessage.Fields.Item("Message".Value
Session.LCID = 3081
date1=Date()
time1=Time()
set comSMSLog = Server.CreateObject("ADODB.Command"
comSMSLog.ActiveConnection = MM_smsLog_STRING
comSMSLog.CommandText = "INSERT INTO SMSLog (First, Last, Mobile, Message, TimeSent, DateSent) VALUES ('"&first1&"', '"&last1&"', '"&mobile1&"', '"&message1&"', '"&time1&"', '"&date1&"')"
comSMSLog.CommandType = 1
comSMSLog.CommandTimeout = 0
comSMSLog.Prepared = true
comSMSLog.Execute()
-----------------------------
However - when I read the date and time coming back in using this...
<%=(rsLogSearch.Fields.Item("TimeSent".Value)%></td>
<%=(rsLogSearch.Fields.Item("DateSent".Value)%></td>
I still get the US times and dates. Has anyone got any advice they could offer? It would be greatly appreciated.
NB: I cannot alter the global.asa file on my server.