When we are developing a website using ASP script, sometime we had to format dates, numbers, currency, etc. by ourself. And relying on the version of Windows that was installed on the server, it is not good idea in case you moved sites from say The United States to a United Kingdom provider. With IIS4 and IIS5 (Windows NT4 and Windows 2000 respectively) you only need to set the LOCALE ID (Session.LCID) and everything is done for you. The Session.LCID is a read/write property, meaning you can assign a value to it as well as read its current value.
Session.LCID has session scope, which means you can just add one line of code to your global.asa file and ASP does the rest for you. Just remember that if you assign a new value to the Session.LCID it will override global.asa and will remain until a new value is set or the session is ended.
Below you can see locale id's for the US and the UK as well as how dates are formatted using these locales.
Session.LCID = 1033 'This is the English(United States) format.
Short Date : 3/15/2007
Long Date : Thursday, March 15, 2007
Time : 12:11:02 AM
Currency : $9.95
Session.LCID = 2057 'This is the English(British) format
Short Date : 15/03/2007
Long Date : 15 March 2007
Time : 00:11:02
Currency : Ј10.00
When working with databases, you will want to also set the format of the date field to correspond with the LCID that is being used in the script. You can do this by going into the design view and setting the format to dd/mm/yyyy or the format you are using.
Below is a table of the LCIDs, and the corresponding language that you have available:
LOCALE ID :
1034____Spanish(Spain - Traditional Sort)