Date formatting problem in ASP applications
Problem Desc: In ASP application, we are using date variable and would like to get it print in format 'dd.mm.yyyy', but it comes as 'mm.dd.yyyy'.
In windows 2000, everything works as expected. But in 2003 it does not work properly.
Cause of the problem: This problem can occur if we are using COM+ component also with application which is running under identity different from IIS.
Resolution:
We need to set the Date formatting in Regional Setting and Language options --> customize --> Date tab --> Specify the date format in Short date format
combobox and also in Advanced tab, select "Default user Account Settings".
Other alternative is to specifically set date formatting in Regional settings and language options for each user under which COM+ components are running and for IIS user.
Disclaimer: This is a personal weblog. The opinions expressed here represent my own and not those of my employer.
Comments
- Anonymous
December 12, 2008
PingBack from http://blog.a-foton.ru/index.php/2008/12/13/date-formatting-problem-in-asp-applications/