Date format broken in .net 4.0 for uk format
Posted
by Chris Foot
on Stack Overflow
See other posts from Stack Overflow
or by Chris Foot
Published on 2010-04-19T10:15:32Z
Indexed on
2010/04/19
10:23 UTC
Read the original article
Hit count: 266
I'm in the process of converting a couple of sites up to .net 4.0 and I seem to have a problem with regionalisaion of dates.
This code:
Date.Today.AddDays((Date.Today.DayOfWeek - 1) * -1).ToString()
In .net 3.5 produces: '19/04/2010 00:00:00' but as soon as I change the app pool to 4.0 it produces: '4/19/2010 12:00:00 AM'
Where can I change the setting that governs this?
© Stack Overflow or respective owner