Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Apr 2002
    Texas, USA
    Thanked 1 Time in 1 Post

    Date Formats (2002/2003)

    Is there a way within Excel (VBA code) to obtain the locale info? My company is now dealing with internatiional clients and so the date format we use in the US does not work for them. I'm looking for a way within VBA to obtain the locale settings, specifically the date format so that I can change the code in an Excel Add-In to respond to varied locale settings.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 30 Times in 30 Posts

    Re: Date Formats (2002/2003)

    Edited by HansV to correct mistake in xlDateOrder values - thanks to Rudi for pointing it out

    Look up International in the Excel VBA help.

    For example, Application.International(xlDateOrder) tells you what the date order is:
    0 = m/d/y (as in the US)
    1 = d/m/y (as in the UK)
    2 = y/m/d (as in Sweden)

    and Application.International(xlDateSeparator) tells you the character used to separate the date parts, for example / or . or -.

Posting Permissions

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