G
Guest
Hello,
I'm facing a strange problem. We have an Asp.net 2.0 Web Application and
somehow the date format is changing from one client to another even if all
the code is running server-side...
Here is the simple sample code used to reproduce the problem :
DateTime date = DateTime.Now.Date;
Response.Write("date.ToString() : " + date.ToString() + "<BR>");
Here is the result I get on my workstation :
date.ToString() : 08/06/2007 00:00:00
And here is the result another client gets :
date.ToString() : 08/06/2007 0.00.00
Notice how the time is formatted. This is strange to me because the
Date.Now.Date is calculated on the server and the formatting too so how can
the result be different ?
I'm a bit stuck on this, any help or advice is welcome.
Kind regards
Gilles
I'm facing a strange problem. We have an Asp.net 2.0 Web Application and
somehow the date format is changing from one client to another even if all
the code is running server-side...
Here is the simple sample code used to reproduce the problem :
DateTime date = DateTime.Now.Date;
Response.Write("date.ToString() : " + date.ToString() + "<BR>");
Here is the result I get on my workstation :
date.ToString() : 08/06/2007 00:00:00
And here is the result another client gets :
date.ToString() : 08/06/2007 0.00.00
Notice how the time is formatted. This is strange to me because the
Date.Now.Date is calculated on the server and the formatting too so how can
the result be different ?
I'm a bit stuck on this, any help or advice is welcome.
Kind regards
Gilles