Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Location
    london
    Posts
    7

    Unanswered: Access 2000 Date problems

    How can i make the dates be displayed all in one format, like 'dd/mm/yy' just like access assigns it when you create the date field and in it's format type as short format ?? rathern then to be displayed in mm/dd/yy format after you insert it into a query then re-display it again...

    please download and review my short example databse below
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    I used to have date display problems. I have changed all formats to yyyy/mm/dd, and if it is not formatted as such, I will use the Format command to make it appear like this. This way no one is confused by this international standard as to which is the year, which is the day and which is the month.

  3. #3
    Join Date
    Nov 2003
    Location
    london
    Posts
    7

    Cool format command in a query

    if I assign a variable x the format command, then place x in my insert query in the 'insert' button code, will the dates be displayed as yyyy/mm/dd format??

    If you noticed, the date format in the firstdate field is as dd/mm/yy, but in the Due Date field in the subform it is displayed as mm/dd/yy, i am trying to make it in the DueDate field to be displayed as dd/mm/yy!! Hence, If you noticed that if htere is a date with the 13th day example

    firstdate field has 13/11/03 (dd/mm/yy) but in the subform
    Due Date field displays 03/11/13 (yy/mm/yy) where I have no clue why it does that after every 12th day of a month?? I thought it may had to do with the
    INSERT INTO tblPayDates('" & me.clientID.value & "', #" & dd & "#)
    query?? It's weird!!

  4. #4
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    To change how a date is displayed in a table, you must use the Format property.
    To change how a date is displayed on a form, you must use the Format property.
    To change how a date is displayed in a report, you must use the Format property.

    etc.

    If you do not specify the format property, then you will be at the mercy of the Regional Settings. The problem with mm/dd/yy or dd/mm/yy is that the computer sometimes misinterprets it. if you always use the yyyy/mm/dd format, the computer has not yet misinterpreted it on me.

    I would use:

    INSERT INTO tblPayDates('" & me.clientID.value & "', #" & format(dd,"yyyy/mm/dd") & "#)

Posting Permissions

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