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

Date Fomat Incorrect for Region 1

Status
Not open for further replies.

zoomboom

Programmer
Apr 2, 2003
6
IN
I'm based in the UK where the date format is dd/mm/yyyy.
However, when I run response.write (Date)from an asp, get 4/10/2003 for today instead of 10/4/2003.

I've checked the regional settings on the Win 2000 server and seen:
Locale - English(UK)
Date - short date sample is correct for UK ie. 10/04/2003.

Is there another area where the date format should be set to the UK?

Thanks

 
Added the preprocessing directive for the UK locale.
LCID=2057 and now works. Should've checked the FAQ!
But doesn't explain why this should be necessary given the environment settings seem OK.

Thanks.

 
Try to use FormatDateTime function, or if doesnt work
tempDate=now()
myDate=Day(tempDate)+"/"+Month(tempDate)+"/"+Year(tempDate)
this should work on any locale system. ________
George, M
 
Thanks. That's a better solution as it saves hard coding the LCID for the locale.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top