Session.LCID changing has no effect

Discussion in 'ASP General' started by Just4U, Aug 27, 2007.

  1. Just4U

    Just4U Guest

    Hello,

    My config : Windows 2003 x64 (US VERSION) + sp2, IIS 6
    All regional settings to French (even for default user)
    In my ASP pages dates are in the good format (french:dd/mm/yyyy), but
    impossible to have US date format when i set the Session.LCID=1033
    I did a simple test:
    <%
    ReturnDateTime 1033, "English (US)"
    ReturnDateTime 1036, "French"
    ReturnDateTime 2048, "English (UK)"
    ReturnDateTime 3081, "English (Australia)"

    Sub ReturnDateTime(locale, description)
    Session.LCID = locale
    Response.Write "<b>" & description & " (LCID = " & locale &
    ")</b><br>"
    Response.Write "Long date: " & FormatDateTime(Date, 1) & "<br>"
    Response.Write "Short date: " & FormatDateTime(Date, 2) & "<br>"
    Response.Write "<p>" & FormatCurrency(1.05, 2) & "<br>"
    Response.Write "<br>" & FormatNumber(1000000,2) & "<br></p>"
    End Sub

    %>

    Results:

    English (US) (LCID = 1033)
    Long date: Monday 27 August 2007
    Short date: 27/08/2007
    1,05 €
    1 000 000,00

    French (LCID = 1036)
    Long date: lundi 27 août 2007
    Short date: 27/08/2007
    1,05 €
    1 000 000,00

    English (UK) (LCID = 2048)
    Long date: lundi 27 août 2007
    Short date: 27/08/2007
    1,05 €
    1 000 000,00

    English (Australia) (LCID = 3081)
    Long date: Monday, 27 August 2007
    Short date: 27/08/2007
    $1.05
    1,000,000.00

    The English US format seems to be ignored.
    If i change some settings for the french format (ex:decimal , to .),
    changes are applied to the English US format too !!

    I tried something else:
    I set the server to English US and I apply regional settings to "all
    settings to the current user account and to the default user profile".
    I reboot and I logon as admin and set my regional settings to French but
    NOT for the default user profile.
    So i have in regestry hkey_users with English US and hkey_current_user
    with French
    Now i logon, and test my asp page i have the right values when setting
    the Session.LCID.
    But it's not a good solution, because i have to logon to get working.
    Why it's not possible to get English US format when hkey_users &
    hkey_current_user are set to french ?

    I'm fed up with this problem.

    Any help will be welcome.
    Just4U, Aug 27, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ubi_comp
    Replies:
    0
    Views:
    2,236
    ubi_comp
    Feb 3, 2006
  2. Claudio Cezar

    Session.LCID does not work

    Claudio Cezar, Oct 14, 2003, in forum: ASP General
    Replies:
    0
    Views:
    179
    Claudio Cezar
    Oct 14, 2003
  3. b_boy

    Session.LCID problem

    b_boy, Oct 16, 2003, in forum: ASP General
    Replies:
    5
    Views:
    138
    b_boy
    Oct 17, 2003
  4. David Patow
    Replies:
    0
    Views:
    285
    David Patow
    Nov 13, 2003
  5. Rob
    Replies:
    8
    Views:
    243
    Bob Barrows [MVP]
    May 5, 2004
Loading...

Share This Page