Web Development

General discussion


How can I get the Date format I want?

By NickOooiiooO ·
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?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

regional settings [of the server]

by Jay Eckles In reply to How can I get the Date fo ...

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:


Collapse -

could not work

by NickOooiiooO In reply to regional settings [of the ...

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

Collapse -

thank you

by NickOooiiooO In reply to regional settings [of the ...

thanx for your info Jay.

Related Discussions

Related Forums