Re: different datetime format on the same web server

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Jim M (JimM_at_nospam.com)
Date: 11/14/04


Date: Sun, 14 Nov 2004 16:11:10 -0600

Look in the control panel under regional and language options or Regional
settings. Make sure the date format is the same on both servers. You can
also set this in your code to ensure you always get the format you want.
Although this uses a page_load you should probably use this in global.asax

imports system.globalization

Sub Page_Load(byval sender as object, e as eventargs)

With System.Threading.Thread.CurrentThread
    Dim ci As New System.Globalization.CultureInfo("en-US")
    Dim dtf As DateTimeFormatInfo = New
System.Globalization.DateTimeFormatInfo
    dtf.ShortDatePattern = "MM.dd.yyyy"
    ci.DateTimeFormat = dtf
    .CurrentCulture = ci
    Response.Write(Now.ToShortDateString)
End With

End sub

"Ya Ya" <ra294@hotmail.com> wrote in message
news:OLGQ2LpyEHA.2876@TK2MSFTNGP12.phx.gbl...
>I have developed a class library for a web application of mine.
>
> When compiling the code of the class library on one development machine
> and copy DLL to my web server I get dd/mm/yyyy date format when using the
> Now() function.
>
> When compiling the same code on another machine and copy the DLL to the
> same web server I get mm/dd/yyyy date format.
>
> I have not change the web.config of the application on the web server (I
> only replace the DLL).
>
> How is that possible?
>
> Can someone help here?
>
>
>
> Thanks
>
> ra294@hotmail.com
>



Relevant Pages

  • Re: different datetime format on the same web server
    ... Make sure the date format is the same on both servers. ... > When compiling the code of the class library on one development machine ... > only replace the DLL). ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: different datetime format on the same web server
    ... Make sure the date format is the same on both servers. ... > When compiling the code of the class library on one development machine ... > only replace the DLL). ...
    (microsoft.public.dotnet.framework)
  • Re: How to share code between two different sites?
    ... application if you have common code for all? ... Three servers are given since all they are for different clients. ... comfortable adding dll to each site manually ) ... You can't add child project to website. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Server Performance Report - Date Format
    ... standard UK format. ... If you want to change the Performance Report format on Server 4 to Standard ... DO NOT CHECK "Default user account settings" ... I receive Emailed Server Performance Reports from 4 Servers (different ...
    (microsoft.public.windows.server.sbs)
  • Re: How to get a .lib from .dll
    ... LIB utility provided with MASM to get the library in COFF format. ... >> There is a file in windows directory called crtdll.dll. ... >> How can I get the list of functions contained in the DLL. ... > IMPDEF and then delete it afterwards;)...what "IMPDEF" does is ...
    (comp.lang.asm.x86)