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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display date problem

Status
Not open for further replies.

necta

Technical User
Mar 8, 2004
35
MY
I intend to display date in dd/mm/yy but the system show mm/dd/yyyy. I have set the system date to dd/mm/yyyy. I am using Window XP. What should I do?

Necta
 
Session.LCID=2048

response.write("<p>")
response.write("LCID is now: " & Session.LCID & "<br />")
response.write("Date format is: " & date() & "<br />")
response.write("Currency format is: " & FormatCurrency(350))
response.write("</p>")

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
What i intend to do is display a date which stored in database....
 
The important thing to do is set the session.LCID (locale identifier) to the region you want for display...

Code:
<%
session.LCID = 2048
set rs = cn.execute("SELECT dateField FROM myTable")

response.write formatDateTime(rs(0),vbshortdate)

%>

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
The result is the same:

"5/20/2004
 
Necta,

I asked the same question some days back and it was mwolf00 who came up with the answer( same as this one).It worked for me, I wonder why it is not working for u.

Can u please post the code ??

 
I'm sorry - set the session.LCID = 2057 (UK)

2048 is USA

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top