Results 1 to 13 of 13
  1. #1
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date format (2000)

    Hello,

    I am having problems with a date input field in access but cannot work out what l am doing wrong.
    I would like the date to appear in the format:

    dd-mmm-yy.

    i.e The user inputs 07-Apr-04

    Not having to enter the '-' sign as l would like them to appear automatically.

    Justin.
    Attached Images Attached Images

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date format (2000)

    In your design view of your table have you entered on the format line in the properties section of the field in question:

    dd-mmm-yy

    Also, I know this sounds wierd...but sometimes your Regional settings in the Control Panel (Date) make a difference in what you see in Access tables.
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  3. #3
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date format (2000)

    Hi,

    I have tried what you told me but still appear to get errors. I think it is a problem with Access as Control panel l think is ok.
    I don't know what though.
    See screenshots for further info.

    Justin.
    Attached Files Attached Files

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

    Re: Date format (2000)

    You could set the Format property to Medium Date or dd-mmm-yy, and the Input Mask to 00->L<LL-00. But test thoroughly if it works for you - input masks for dates are tricky.

  5. #5
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date format (2000)

    I have changed output mask to what you mentioned but still appear to get an error , see attachments.

    Justin.
    Attached Images Attached Images

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

    Re: Date format (2000)

    Your browser messed up the input mask (this sometimes happens with "greater than" and "less than" symbols). See screenshot for what the input mask should be.
    Attached Images Attached Images
    • File Type: png x.png (1.4 KB, 0 views)

  7. #7
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date format (2000)

    That was the problem the input mask was incorrect. Thanks for your help.
    It now works fine. Althought is it possible to include an upper case character for the date.
    i.e "Apr" rather than "apr"

    00->L<LL-00

    I have tried to understand how this is done for future reference.

    00 (numeric)
    LL (alpha)
    00 (numeric)

    I understand this.

    But what is the purpose of <L<LL? i.e the use of the "<" character?
    Could you explain this?

    Justin.

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

    Re: Date format (2000)

    A > specifies that text following it will be converted to upper case.
    A < specifies that the text following it will be converted to lower case.

    So > L < LL (I have inserted spaces in the hope that the browser will display it correctly) means: the first letter will be converted to upper case, the following two will be converted to lower case.

  9. #9
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date format (2000)

    How could l change the following mask so that the first letter is in caps?

    00> L<LL-00

    Justin

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

    Re: Date format (2000)

    The > should take care of that. What do your Windows control panel settings specify? Is a month displayed as "april" or as "April"?

  11. #11
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date format (2000)

    Please find attached a screen of control panel settings.

    Justin.
    Attached Images Attached Images

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

    Re: Date format (2000)

    I'm sorry, I can't explain why you don't get the month with initial cap.

  13. #13
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Date format (2000)

    I made a table just to monkey around with a date format.

    Format is "Medium Date"
    Input Mask is 99/>L<LL/00;;_

    With this setup, I get "8-Apr-04" in the Date field in Datasheet view.

Posting Permissions

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