dcsimg
Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Web
Expertise: All
May 7, 1999

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Format Dates in Active Server Pages Using the Locale Identifiers

The Active Server Pages Session object includes an under-used property called LCID. The LCID, or locale identifier, helps you format your ASP code to suit your target audience. For instance, Canada tends to use dd/mm/yy to format dates while Germany uses dd.mm.yy. Here's some example ASP code that shows how the same date takes on a different look according to the LCID:
 
<%
USEnglish=1033
EnglishCanada=4105
German=1031
thedate=date()
Session.LCID=USEnglish
Response.Write thedate & "<BR>"
Session.LCID=EnglishCanada
Response.Write thedate & "<BR>"
Session.LCID=German
Response.Write thedate & "<BR>"
%>
The code produces this output in the browser:
 
4/25/99
25/04/99
25.04.99
For more information on language codes, check http://www.microsoft.com/OpenType/otspec/lcid-cp.txt.
Ken Cox
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date