Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Oct 2003
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date Input Masks (Access 2002)

    I have a date field and want the user to enter the date in the following format: MM/DD/YYYY, i set up the following date input mask - 99/99/0000;0;_
    The problem is that it does not capture the YYYY but always truncates it to MM/DD/YY - how do i correct this?
    Also do you recommend using all 9's or all 0's? ie 99/99/9999 or 00/00/0000 is there a significant difference?
    Also the user may not have all of the date (month, day and year), is there a way to get this field to accept 0s for the unknown portions and still have the field as a date?
    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Date Input Masks (Access 2002)

    An input mask and display format are not the same. If you have an input mask mm/dd/yyyy and a format mm/dd/yy, you have to enter 10/29/2003 but it will be displayed as 10/29/03.

    I have quit using an input mask for dates (in fact, for anything except passwords). Users were always wrestling with it. I set the format property of the text box to one of the date formats; this makes Access check input automatically.

    If you want the user to be able to enter only part of a date, don't use a date field. Use separate year, month and date fields instead.

  3. #3
    New Lounger
    Join Date
    Oct 2003
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Input Masks (Access 2002)

    Thanks.
    I changed the table field Date to the format MM/DD/YYY and the text box format that links to that field format is MM/DD/YYYY. No input masks. I entered 10/01/0202 but it displays 10/01/202 and when i enter 10/01/26 or 10/01/0026 it displays 10/01/2026. Any suggestions?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Date Input Masks (Access 2002)

    The 0202 > 202 change seems to be a bug in the way Access/Windows handles date formats. But why would you want to enter 202 as year?

    The rule for interpreting years entered with 2 digits is that anything below 30 is interpreted as being in the 21st century, so 03 > 2003 and 27 > 2027, and that years in the range 30 ... 99 are interpreted as being in the 20th century, so 52 > 1952. Access doesn't provide for years in the first century.

Posting Permissions

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