Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formatting foreign language dates (Word2000 et al)

    There's probably a better way of doing it. Comments and Corrections welcome.
    A client does business with Quebec, which is not really French, as there are so many quirks in the language.
    I've previously set language=Portugese(Brazil) for a different client, and lived to regret it (messed up my language checking in Word)
    So I decided to roll my own (attached), and I can customize it should the client request I do so.

    <pre>Sub TESTstrdateLanguageDate()
    Debug.Print strDateLanguageDate(Now, "Fr") ' "27 mai 2008"
    Debug.Print strDateLanguageDate(Now, "german") ' "27 Mai 2008"
    Debug.Print strDateLanguageDate(Now, "AustraliaN") ' "27 May 2008"
    End Sub</pre>


    See also <post:=617,147>post 617,147</post:>
    Attached Files Attached Files

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

    Re: Formatting foreign language dates (Word2000 et al)

    Some nit-picking comments:

    - You have a space after the name or abbreviation for December in several languages.
    - The abbreviated French names should have accents too: févr. août déc.
    - There are 2 points after nov in Italian.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting foreign language dates (Word2000 et

    >Some nit-picking comments:
    I've never felt more honored as a nit .....

    >abbreviated French names
    Thanks, that's what comes of obtaining data from several different sources (and not paying attention to the détails)

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Formatting foreign language dates (Word2000 et

    > > abbreviated French names
    > Thanks, that's what comes of obtaining data from several different sources (and not paying attention to the détails)

    A warning about the use of accented characters in VBA. If you create the accented characters by typing them from your keyboard then anyone who tries to compile your module in Japan (and presumably some other countries that use 16 bit characters) will get the most incomprehensible syntax errors.

    This is because some combination of accented characters gets converted to a " which closes the string early. It took me ages to debug why my code was broken in some far east countries - I had to take over a Japanese colleague's PC over the network and try to single step with Japanese menus!

    StuartR

  5. #5
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Formatting foreign language dates (Word2000 et

    > - I had to take over a Japanese colleague's PC over the network and try to single step with Japanese menus!

    Stuart; I must applaud your tenacity. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Regards
    Don

Posting Permissions

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