Discussion Locked

How can I get the Date format I want?

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I tried to use FormatDateTime function in VBScript to get the format I want but failed. It says in the documentation that this function captures the setting in the regional setting and would display accordingly but my test results is negative. I tryto format to dd/mm/yyyy. Does any one know how?

3 replies

by jay eckles

I assume you do know that if you're using VBScript in ASP, then the regional settings that the function is capturing are the regional settings of the web server, not the web client.

That being said, if you've set the server's settings so that a short date is of the format dd/mm/yyyy, then FormatDateTime( date, vbShortDate ) should return a date in that format.

Here's the reference page from MSDN:
http://search.microsoft.com/gomsuri.asp?n=1&c=rp_Results&siteid=us/dev&target=http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctformatdatetime.asp

Jay

by nickoooiiooo

Its working fine as long as you didn't log in into the system. Once logged into the server, the result automatically back to the US date format. I'm using 2k Advanced server. It drives me crazy.
I wonder if there's a setting/ step done wrong when Iinstall the OS

This discussion is closed to new replies.