MSACCESS months and day swapped

Discussion in 'Databases' started by prae, Oct 14, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi Guys,

    We have a website database (msaccess) with dates of format DD/MM/YYYY

    When we enter 14/08/2004, it works
    When we enter 07/08/2004, it actually enters 08/07/2004 in the database.

    We don't have this problem locally here, on our development plateform.

    Our regional settings are set to English (Australia).
    In the MSACCESS table definition, we set the format dd/mm/yyyy

    It works really well here, but months and days are swapped on your server when we enter a day <= 12.

    Any idea, we're lost !

    Thank you,

    Philippe
     
  2. ASP
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    Are you using ASP.net or ASP?

    quote:Originally posted by prae

    Hi Guys,

    We have a website database (msaccess) with dates of format DD/MM/YYYY

    When we enter 14/08/2004, it works
    When we enter 07/08/2004, it actually enters 08/07/2004 in the database.

    We don't have this problem locally here, on our development plateform.

    Our regional settings are set to English (Australia).
    In the MSACCESS table definition, we set the format dd/mm/yyyy

    It works really well here, but months and days are swapped on your server when we enter a day <= 12.

    Any idea, we're lost !

    Thank you,

    Philippe


    </blockquote id="quote"></font id="quote">

    B.

    DiscountASP.NET
    http://www.DiscountASP.NET
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    Well... I don't think ASP has the locale setting like ASP.net.

    You may need to format the date before inserting to the database.

    FormattedDate = Format(Now,"MM/dd/yyyy")

    quote:Originally posted by prae

    ASP
    </blockquote id="quote"></font id="quote">

    B.

    DiscountASP.NET
    http://www.DiscountASP.NET
     

  5. You can set the server locale on each individual page. This is the code I use to set it to English (UK) for example:

     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page