Re: different datetime format on the same web server
From: Jim M (JimM_at_nospam.com)
Date: 11/14/04
- Next message: Ken Tucker [MVP]: "Re: Adding to Outlook Task List with VB .net"
- Previous message: Larry Woods: "How do I use a combobox for master-detail binding with a datagrid?"
- In reply to: Ya Ya: "different datetime format on the same web server"
- Messages sorted by: [ date ] [ thread ]
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
>
- Next message: Ken Tucker [MVP]: "Re: Adding to Outlook Task List with VB .net"
- Previous message: Larry Woods: "How do I use a combobox for master-detail binding with a datagrid?"
- In reply to: Ya Ya: "different datetime format on the same web server"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|