changing date formats

S

Suzanne

Hi,

I am having problems with my website which uses ASP.

It is switching between American and European date formats - this is causing
problems on the page which use the Date function.
Most of the time the page works ok but sometimes it seems to switch formats
and this messes up the code on the page.

I have spoke with the people who look after the servers on which the site
runs but do not know what is causing this.
They have not made any changes to the date format of these machines.
The website and the database are kept on different servers.

Has anyone came across this problem before
I'm very confused!
Suzanne
 
E

Evertjan.

Suzanne wrote on 24 aug 2004 in microsoft.public.inetserver.asp.general:
I am having problems with my website which uses ASP.

It is switching between American and European date formats - this is
causing problems on the page which use the Date function.
Most of the time the page works ok but sometimes it seems to switch
formats and this messes up the code on the page.

I have spoke with the people who look after the servers on which the
site runs but do not know what is causing this.
They have not made any changes to the date format of these machines.
The website and the database are kept on different servers.

Has anyone came across this problem before

Hi Suzanne,

If you had read the archive of this NG (via google groups) you would have
known that the universal format is yyyy-mm-dd.

So change all dates from outside to this format and vice verso.

and read the de facto faq: <http://aspfaq.com/show.asp?id=2313>
 
S

Suzanne

Thanks,

But why would it keep changing between American and European format?
and which server would be causing the problem?

Suzanne
 
A

Aaron [SQL Server MVP]

Maybe users are logging onto the box... I believe the web site will inherit
whatever the current regional settings are.

Short answer: stop relying on the regional format of the box! Take control
of the situation!
 
S

Suzanne

What do you mean - "Maybe users are logging onto the box... I believe the
web site will inherit
whatever the current regional settings are."

Please explain more!

Suzanne
 
A

Aaron [SQL Server MVP]

If I have a profile on a box, and I set my own regional format to UK
English, and I log onto the box, then the box suddenly is in UK English
locale. When I log off, it goes back to US English (or whatever the system
default locale is).

Again, stop worrying about this and format the date yourself, or use
setLocale so you override the server settings.

--
http://www.aspfaq.com/
(Reverse address to reply.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top