Force Date format in Web Application

Posts   
 
    
wayne avatar
wayne
User
Posts: 611
Joined: 07-Apr-2004
# Posted on: 07-Sep-2004 16:33:07   

Hi All

How would i force the dateformat of a web application to be in a diffirent format than the servers date format?

I dont want to do a MyDate.toString(MyFormat) - it must be a global change for the application, hmm.. or maybe per session.

I think that it is a change to the CultureInfo but i am not entirly sure.

jtgooding
User
Posts: 126
Joined: 26-Apr-2004
# Posted on: 07-Sep-2004 16:43:11   

If you are trying to internationalize your web app, lookup the Session.LCID variable it will change the way date/time is formated based off the country code you assign so you don't have to supply a display mask for each tostring.

John

wayne avatar
wayne
User
Posts: 611
Joined: 07-Apr-2004
# Posted on: 07-Sep-2004 16:52:30   

Thanks, I just read that i should rather use the CultureInfo Class as the Session.LCID property is only for backward compatibility.simple_smile

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39826
Joined: 17-Aug-2003
# Posted on: 07-Sep-2004 17:49:20   

Session.LCID is the id the browser specified, I don't know if this is propagated by .NET into the active culture, if it is, use CultureInfo, otherwise use LCID. simple_smile

Frans Bouma | Lead developer LLBLGen Pro