Basic Date Picker Forums

Welcome to Basic Date Picker Forums Sign in | Join | Help
in Search

Date format changed from one machine to the next!

Last post 06-01-2006, 5:23 PM by geoffrey.mcgill. 1 replies.
Sort Posts: Previous Next
  •  11-22-2005, 10:23 AM 364

    Date format changed from one machine to the next!

    Hi all,

    I just created a very simply ASP.NET application that uses the BDP Lite.

    It works fine on my machine with the format MM/DD/YYYY when you pick a date from the calendar but when I deploy it on another machine which is also XP SP2 the date becomes DD/MM/YYYY.

    The IIS version on both machine is the same (5.1).

    I've checked the Regional and Language Options on both machines and don't see any differences.

    Any idea why?

     

  •  06-01-2006, 5:23 PM 566 in reply to 364

    Re: Date format changed from one machine to the next!

    Hi Matrix,

    The control picks up the current Threads Current CultureInfo object to determine the ShortDate format. We have found changing the Regional and Language Options on the server don't always (never) apply correctly.

    We would suggest setting the culture on the page level, example:

    <%@ Page Culture="en-GB" Language="C#" %>

    or, setting the culture in the Web.config, example:

    <system.web>
                <
    globalization culture="en-GB"/>

    or, hard coding the current Thread, example:

    System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB");

    Any one of those solutions above should give you consistency across both servers. Obviously change "en-GB" to your prefered Culture.

    Hope this helps.


    Thanks,
    Geoffrey McGill
    ----------------------------------------
    Coolite Inc.
    Email: support [at] coolite [dot] com
    Phone: +1(888)775-5888
View as RSS news feed in XML
 
Powered by Community Server, by Telligent Systems