Locale & Date Problems

Results 1 to 3 of 3

Thread: Locale & Date Problems

  1. #1
    Fraser Murrell Guest

    Default Locale & Date Problems

    Guys,<BR><BR>I`m from England and we therefore have the date format as :<BR><BR>dd/mm/yy<BR><BR>So.. I`ve got an Access database setup with a date field (Short date - dd/mm/yy). I`m trying to populate the database field from a form, using ASP through an ODBC connection. No problems - just fire an SQL statement using ADO stuff - easy.<BR><BR>However, if I submit the date in dd/mm/yy format like I want, somewhere along the line it gets converted to : mm/dd/yy. It even gets listed from MS Access as this, and of course plays havoc when I try to pull the date back into my ASP page.<BR><BR>Interestingly enough, if I submit the date as dd mmm yy (ie. 10 Sep 00) Access has no problems, and populates my date field with the english format equivalent - 10/09/00.<BR><BR>My question is, where on earth is this switch around occurring, and is there a way to cure it without having to make up silly little functions to swap the month/day around for display purposes?<BR><BR>I`ve got Locale ID setup in my ASP page for British/English. The date formats on the NT server are configured correctly, and the locale settings on the server are correct. Even the date/locale settings on the browsers workstation is correct.<BR><BR>Thanks!<BR>Fraser

  2. #2
    Mauricio C. Guest

    Default RE: Locale & Date Problems

    I had that same problem...<BR><BR>I haven&#039t been able to FIX it.. but I made a workaround.<BR><BR> When you do your INSERT INTO.. set the date as mm/dd/yy.. like this:<BR><BR> Dim MyDate<BR> <BR> MyDate = Date() &#039Now your MyDate is today. dd/mm/yy<BR> MyDate = month(MyDate())&"/"&day(MyDate())&"/"&year(MyDate)<BR><BR> ObjADOConn.execute("INSERT INTO (Date) VALUES (&#039MyDate&#039)") <BR><BR> If you insert the date "backwards" then access (I think he&#039s responsible for it) will set it up right.<BR><BR> If anyone else knows of a REAL way of FIXING it.. please Tell us so.<BR><BR>Mauricio C.

  3. #3
    Paul Brown Guest

    Default RE: Locale & Date Problems

    IF this is an nt webserver,<BR><BR>I too had this problem I resolved it by<BR><BR>using regedit<BR><BR>search for "idate" there is 2 occurences in the registry. ensure its value = 1<BR><BR>search for "slanguage" there is 2 occurences in the registry. ensure its value = ENG<BR><BR>search for "shordate" there is 2 occurences in the registry. ensure its value = dd/MM/yy<BR><BR>Also there is another value<BR>HKEY_LOCAL_MACHINESOFTWAREMicrosoftJet4.0 EnginesXbaseDate<BR><BR>this should be DMY<BR><BR><BR>good luck<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts