I still have problem of date format

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default I still have problem of date format

    I am using MS Access as my data source. The date field
    was originally set to dd/mm/yyyy format and the server of
    regional setting as well. Recently I have changed both
    date format to dd/mm/yyyy. When I try to input the data
    using adodb.recordset, it still store the data fomrat to
    mm/dd/yyyy. The weirdest part is the date format works
    fine with 2 digits day but not single digit. For
    example, it will work fine if I store 19/01/2003 but it
    wouln't work with 09/01/2003. It will come out
    01/09/2003. Why ?? I have used the SetLocale function,
    but it didn't work either! Any experts can help?


    rick rick Guest

  2. Similar Questions and Discussions

    1. Date format 07-JUL-03
      What's the simplest format method to force the medium date format to capitalize the month, like 07-JUL-03 instead of 07-Jul-03 in a form text box?...
    2. Date Format in Com+
      Hi All, I have one Component in VB6. My component receive a date as string parameter ("dd/MM/yyyy"). My componente understand "MM/dd/yyyy". Then I...
    3. Date Format Problem - SQL Server Insert From Web Application
      Hi, I've written a short aspx file so that end users can insert lines into our SQL server database. The following string is sent by Internet...
    4. converting date into database date format(newbie)
      Hi! U can convert "8-Aug-03" into mysql date which requires yyyy-mm-dd format as below. <?php date("Y-m-d",strtotime("8-Aug-03")); ?>
    5. #24966 [NEW]: Date format problem
      From: f dot ledoeuff at hud dot ac dot uk Operating system: win nt4 PHP version: 4.3.1 PHP Bug Type: MSSQL related Bug...
  3. #2

    Default Re: I still have problem of date format

    Access stores the date as a double precision not as dd/mm/yyyy etc, the
    decimal part is a long date and the remainder is a long time.
    The date format in access is only the display date and has nothing to do
    with the stored date.
    The reason it stores 19/01/2003 the right way is it cant store interpreit
    any other way, where as 09/01/2003 can be store either way so access swaps
    it round.
    Put your dates in access as yyyy/mm/dd and it will go in properly.

    Regards
    Don Grover





    "rick rick" <anonymous@discussions.microsoft.com> wrote in message
    news:0b2e01c3da8a$d8da40f0$a101280a@phx.gbl...
    > I am using MS Access as my data source. The date field
    > was originally set to dd/mm/yyyy format and the server of
    > regional setting as well. Recently I have changed both
    > date format to dd/mm/yyyy. When I try to input the data
    > using adodb.recordset, it still store the data fomrat to
    > mm/dd/yyyy. The weirdest part is the date format works
    > fine with 2 digits day but not single digit. For
    > example, it will work fine if I store 19/01/2003 but it
    > wouln't work with 09/01/2003. It will come out
    > 01/09/2003. Why ?? I have used the SetLocale function,
    > but it didn't work either! Any experts can help?
    >
    >

    Don Grover Guest

  4. #3

    Default Re: I still have problem of date format

    Always use an ISO standard date format, like YYYY-MM-DD. Then there is no
    confusion from software or people.

    If you allow free text date entry, well, you'll always have this problem.
    If you use dropdowns or a calendar control, however, you can avoid all the
    ambiguity and prevent users from becoming frustrated.

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]




    "rick rick" <anonymous@discussions.microsoft.com> wrote in message
    news:0b2e01c3da8a$d8da40f0$a101280a@phx.gbl...
    > I am using MS Access as my data source. The date field
    > was originally set to dd/mm/yyyy format and the server of
    > regional setting as well. Recently I have changed both
    > date format to dd/mm/yyyy. When I try to input the data
    > using adodb.recordset, it still store the data fomrat to
    > mm/dd/yyyy. The weirdest part is the date format works
    > fine with 2 digits day but not single digit. For
    > example, it will work fine if I store 19/01/2003 but it
    > wouln't work with 09/01/2003. It will come out
    > 01/09/2003. Why ?? I have used the SetLocale function,
    > but it didn't work either! Any experts can help?
    >
    >

    Aaron Bertrand - MVP Guest

  5. #4

    Default I still have problem of date format

    It works fine now. Thanks for Araon and Don for your
    advise. Many many thanks!

    rick rick Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139