changing date formats

Discussion in 'ASP General' started by Suzanne, Aug 24, 2004.

  1. Suzanne

    Suzanne Guest

    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
    Suzanne, Aug 24, 2004
    #1
    1. Advertising

  2. Suzanne

    Evertjan. Guest

    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)
    Evertjan., Aug 24, 2004
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:Oz#...
    > 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
    >
    >
    Aaron [SQL Server MVP], Aug 24, 2004
    #3
  4. Suzanne

    Suzanne Guest

    Thanks,

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

    Suzanne

    "Suzanne" <> wrote in message
    news:Oz%...
    > 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
    >
    >
    Suzanne, Aug 24, 2004
    #4
  5. 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" <> wrote in message
    news:#...
    > Thanks,
    >
    > But why would it keep changing between American and European format?
    > and which server would be causing the problem?
    >
    > Suzanne
    >
    > "Suzanne" <> wrote in message
    > news:Oz%...
    > > 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
    > >
    > >

    >
    >
    Aaron [SQL Server MVP], Aug 24, 2004
    #5
  6. Suzanne

    Suzanne Guest

    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]" <> wrote in message
    news:...
    > >

    > 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" <> wrote in message
    > news:#...
    > > Thanks,
    > >
    > > But why would it keep changing between American and European format?
    > > and which server would be causing the problem?
    > >
    > > Suzanne
    > >
    > > "Suzanne" <> wrote in message
    > > news:Oz%...
    > > > 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
    > > >
    > > >

    > >
    > >

    >
    >
    Suzanne, Aug 24, 2004
    #6
  7. 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" <> wrote in message
    news:#...
    > 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!
    Aaron [SQL Server MVP], Aug 24, 2004
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew J Gray

    asp.net date/time formats

    Andrew J Gray, Mar 4, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    455
    Andrew J Gray
    Mar 4, 2004
  2. David Jessee

    date to text formats - neverending story

    David Jessee, Apr 29, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    351
    Leo Muller
    Apr 29, 2004
  3. Martin Eyles

    Date Formats of Date in Database

    Martin Eyles, Mar 28, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    1,738
    Martin Eyles
    Mar 29, 2006
  4. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,225
    Michael Borgwardt
    May 30, 2004
  5. Aparna
    Replies:
    2
    Views:
    533
    Martin Gregorie
    Jun 14, 2007
Loading...

Share This Page