Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    122
    Thanks
    27
    Thanked 1 Time in 1 Post

    Custom Property - Date Format (Word 2002)

    I have created custom properties, one of which is in date format. My regional settings are dd/mm/yyyy. If I enter 31/1/06 (via a VBA form) it stores it as 31 January 2006 - ie if I read it back and display it in long format it is correct. BUT, if I enter 1/7/06 instead of 1 July 2006 I get 7 January 2006! Yes, I could use only text fields - but this is very frustrating. Are people using US date formats the only ones who can use this? Is there another setting buried away that I (and all our users) need to tweak?

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

    Re: Custom Property - Date Format (Word 2002)

    On my Dutch language system, the date format is dd-mm-yyyy. Custom date properties are interpreted correctly, i.e. 01-07-06 is interpreted as 1 July 2006, not as January 7, 2006. So either the separator - instead of / makes a difference, or there is some vestige of US date format on your system.

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Custom Property - Date Format (Word 2002)

    Hi Judith,

    There may be an issue with how your form stores the date. Quite obviously, 31/1/06 can't be a date in mm/dd/yy format, but 1/7/06 is ambiguous. If you force the form to store the date in DD-MMM-YYYY format, regardless of how it is input, you should still be able to retrieve it later in any DMY short or long format.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

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

    Re: Custom Property - Date Format (Word 2002)

    I assumed that Judith was talking about custom document properties (File | Properties, Custom tab). One of the available data types for a custom document property is Date; it ought to respect the user's system settings.

  5. #5
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    122
    Thanks
    27
    Thanked 1 Time in 1 Post

    Re: Custom Property - Date Format (Word 2002)

    Thanks everyone - yes I assumed it would respect my settings - no such luck. So I have told it it is dd mmm yyyy (even though it is dd mm yy) and now it seems to work; <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    .CustomDocumentProperties("df_EffectiveDate") = Format(txtEffectiveDate.Text, "dd mmm yyyy")

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

    Re: Custom Property - Date Format (Word 2002)

    You hadn't told us that you were using VBA code to set the property. VBA is strictly US oriented, ignoring your local settings, so you must use a format that Americans understand, such as mm/dd/yyyy or d-mmm-yyyy.

Posting Permissions

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