473,486 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

changing date formats

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
Jul 19 '05 #1
6 2510
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>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
Use your own function to format the date. I recommend yyyy-mm-dd or
yyyymmdd because these can not be confused by American vs. European
visitors. m/d/y and d/m/y are ambiguous and confusing.

http://www.aspfaq.com/2260
http://www.aspfaq.com/2313

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


"Suzanne" <su************@qubac.uk> wrote in message
news:Oz**************@TK2MSFTNGP12.phx.gbl...
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

Jul 19 '05 #3
Thanks,

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

Suzanne

"Suzanne" <su************@qubac.uk> wrote in message
news:Oz****************@TK2MSFTNGP12.phx.gbl...
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

Jul 19 '05 #4
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!

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


"Suzanne" <su************@qubac.uk> wrote in message
news:#l**************@TK2MSFTNGP09.phx.gbl...
Thanks,

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

Suzanne

"Suzanne" <su************@qubac.uk> wrote in message
news:Oz****************@TK2MSFTNGP12.phx.gbl...
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


Jul 19 '05 #5
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

"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:Oc**************@TK2MSFTNGP09.phx.gbl...

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

control of the situation!

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


"Suzanne" <su************@qubac.uk> wrote in message
news:#l**************@TK2MSFTNGP09.phx.gbl...
Thanks,

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

Suzanne

"Suzanne" <su************@qubac.uk> wrote in message
news:Oz****************@TK2MSFTNGP12.phx.gbl...
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



Jul 19 '05 #6
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.)



"Suzanne" <su************@qub.ac.uk> wrote in message
news:#P**************@TK2MSFTNGP11.phx.gbl...
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!

Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
9423
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
1
60885
by: jt | last post by:
I posted this yesterday, but I am not seeing this out yet: I am having problems with updating a date field in a certain format. The data is stored in an Oracle database. The date is...
15
42975
by: Simon Brooke | last post by:
I'm investigating a bug a customer has reported in our database abstraction layer, and it's making me very unhappy. Brief summary: I have a database abstraction layer which is intended to...
2
9310
by: Connie Sawyer | last post by:
I am trying to run the following query: ALTER TABLE dnb_profile ALTER COLUMN datetime and I keep getting the following error: Server: Msg 242, Level 16, State 3, Line 1 The conversion of...
4
5340
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
1
357
by: Gani Pola | last post by:
Can someone please tell me how I can change the date format (e.g dd/mm/yyyy, mm/dd/yyyy) in a configuration file? In my windows app, I can retrieve the windows setting but not my ASP.NET...
6
4822
by: Jim Davis | last post by:
Before I reinvent the wheel I thought I'd ask: anybody got a code snippet that will convert the common ISO8601 date formats to a JS date? By "common" I mean at the least ones described in this...
20
35381
by: andreas | last post by:
When I copy a vb.net project using date formats from one PC with a windows date format f.e. dd/mm/yyyy to another PC having a format yy/mm/dd then I get errors. How can I change for a while in the...
9
1559
by: SOLVER | last post by:
Hi, I can't figure out why this is not working propelly: date("d.m.Y",strtotime("05/03/2008 00:00:00")); result: 03.05.2008 date("d.m.Y",strtotime("18/05/2008 00:00:00")); result:...
0
7099
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7319
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4864
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3069
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.