in reply to Re^5: The joys of bad code
in thread The joys of bad code

Well, this code has to be locale independent so I actually can sympathise with this approach. We normally deploy onto German Computers but we also end up on various others as well and the output has to be english regardless so I can see why he took this approach than figuring out how to override the users locale settings. (OTOH if you know an easy way to do it im all ears :-)


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi

    Flux8


Replies are listed 'Best First'.
Re^7: The joys of bad code
by Golo (Friar) on Oct 28, 2004 at 14:21 UTC
    (OTOH if you know an easy way to do it im all ears :-)
    Maybe SetLocaleInfo() is of help?
Re^7: The joys of bad code
by Anonymous Monk on Oct 28, 2004 at 14:26 UTC
    Ah, I was thinking the opposite, that you would want the language to change when you changed the locale settings.

    I don't have anywhere to test it, but if I remember correctly I *think* that if you do the following, it will return formatted U.S. English regardless of system settings.

    Dim dToday As Date dToday = #10/28/2004# MsgBox format(dToday#,"mmm")
    (i.e. Use # rather than " to define your dates. It may be SQL I'm thinking of though... If you have a chance to test it, let me know :) )
      Oops, correction...
      Dim dToday As Date dToday = #10/28/2004# MsgBox format(dToday,"mmm")