Change system date style formate through codding
-
How can i change the system date style formate through code. I have a project when it starts it compare the current date withe the condition date is the date formate is wrong it give error plz help me out.
-
http://www.microsoft.com/globaldev/getWR/steps/wrg_date.mspx[^] look into this !!
Sathy
-
How can i change the system date style formate through code. I have a project when it starts it compare the current date withe the condition date is the date formate is wrong it give error plz help me out.
You shouldn't change the system's format! Instead: 1. Retrieve the current date 2. Reformat it to the format you require 3. Compare If you use the DateTime.Parse() method you shouldn't even need to do this as it will handle all date and date/time formats for you.
-
How can i change the system date style formate through code. I have a project when it starts it compare the current date withe the condition date is the date formate is wrong it give error plz help me out.
You asked the same question yesterday and were informed that this was not a good idea back then. Why do you think you'll get a different answer today? The simple answer is that your application should not change the behaviour of the system to suit itself - this is a bad thing to do because you are upsetting the customer experience of the system. Instead, you need to bite the bullet and actually do some work yourself - if your code requires a particular date format, use the DateTime class to manage this in your code. This is the responsible, professional thing to do and you could have achieved this in the time you've spent faffing about trying to get people to tell you how to upset your users.
Deja View - the feeling that you've seen this post before.