Date Format not taking system locale/user settings

Discussion in 'Windows Small Business Server' started by andrew d, Jan 21, 2005.

  1. andrew d

    andrew d Guest

    I have a SBS2003 box with a website that uses VB6 DLLs in COM+ called from
    the ASP to go to the SQL 2000 backend.

    The windows date settings are for "dd/MM/yyyy" and I have on Session_OnStart
    of the global.asa a Session.LCID=3081 (for Australian formats).

    The problem is on a page that is rendered by the VB6 stuff, the date goes in
    as the correct date (eg: 14/1/2005 for 14th January 2005) but when it comes
    from the COM+ to SQL it has been flipped. (Did a sql trace to find this;
    "Insert into table (fielddate) values ("1/12/2005")"

    The VB6 are dumb objects that treat all things as strings so there is no
    date handling and hence no formatting issues within that layer.

    So the problems seem to lie in the ASP layer as my reading of it.

    This site works on a heap of other servers (all 2000 servers) but has this
    issue on 2003. Also similar problems have arisen with other (entirely
    differently architected) sites going from 2000 to 2003 here.

    Anyone got any pointers for me?

    Thanks

    andrew
     
    andrew d, Jan 21, 2005
    #1
    1. Advertisements

  2. andrew d

    Tony Su Guest

    Andrew, there are probably multiple ways to address this, but I'd probably
    just go with the flow and not worry too much how dates are stored in MS SQL.
    SQL has a high tolerance of accepting many different formats and parsing
    correctly, so it's not going to be an issue where fields are mixed up.

    If you're very particular how your dates are displayed, you can always
    reformat at that time.

    Tony
     
    Tony Su, Jan 22, 2005
    #2
    1. Advertisements

  3. andrew d

    andrew d Guest

    I'm really opposed to doing that because it's not addressing the issue but
    working around it.

    This works on Windows 2000 but not Windows 2003. Date handling has somehow
    changed; I need a way to make the dates behave consistently.

    Surely there must be something that'll give me that?

    Regards,

    Andrew
     
    andrew d, Jan 23, 2005
    #3
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.