Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LCID Local Date / Time

Status
Not open for further replies.

Headshot001

Programmer
Mar 23, 2003
1
AU
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(&quot;TimeSent&quot;).Value)%></td>
<%=(rsLogSearch.Fields.Item(&quot;DateSent&quot;).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.
 
Hi,

r u fetching the value from DB and showing it out , or just setting the LCID value and getting the Date and Time value..
If u send the the o/p format u r getting in ur browser , we can give the clear picture of ur problem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top