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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>
> (E-Mail Removed)
>