+ Reply to Thread
Results 1 to 3 of 3

UK vs US Date Format in User Form

  1. #1
    Registered User
    Join Date
    12-02-2009
    Location
    New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    10

    Smile UK vs US Date Format in User Form

    Hello

    Having an issue with the date in a UserForm Txt field, displaying US Date format.
    For this example, I use these test dates: a) 2 Mar 2013 and b) 13 Mar 2013

    Worksheet
    Column8: LDATE
    Format (UK date format): d/mm/yyyy

    UserForm (purpose:to edit records on the ws)
    Field: txtLDATE
    Poulated from LDATE in ws.

    The date is pulled from the ws to the userform with this code:

    Please Login or Register  to view this content.

    If I don't have the 'with' section of the code, the date comes into the UserForm in US date format, as so:
    a) 3/2/2013
    b) 3/13/2013

    and I thought I had resolved that with the addition of the 'with' section of the code - however , no - it's only a half-solution:

    This is the problem:

    If I have the 'with' section of the code, only dates with a day from 13th to the 31st format as UK date.
    Any date from the 1st the the 12th day, format as US date. As so:
    a) 3 Feb 2013 (wrong)
    b) 13 Mar 2013 (right)

    If instead of the 'with' section of code, I have EITHER of the following lines - the result is just the same:

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    And it makes no difference what the dateFormat is on the ws - whether it's the exact same format
    as in the code for the UserForm or not.

    If anyone could help me reslove this, i would be most grateful! I have searched for solutions but can't seem to find anything.

    Cheers
    Annieb
    Last edited by annieb; 05-05-2013 at 08:04 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: UK vs US Date Format in User Form

    Try using the .Value2 property from the cell. It's the unformatted serial date value.

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 05-05-2013 at 07:40 PM.

  3. #3
    Registered User
    Join Date
    12-02-2009
    Location
    New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: UK vs US Date Format in User Form

    Hi AlphaFrog

    Works perfectly

    Thanks you so much - problem solved!

    Cheers
    Annieb

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1