If you need to change the date and time format according to a specific region in the world for your application you can do that. In this article I will give you a step-by-step guide on how to Format Date for a Specific Culture in ASP.
The DateTimeFormatInfo class can be use within your application to format and display a DateTime type based on culture. By culture, it means the format that your region uses for time and date.
For instance, if your server has a time and date format and you want to show or use in your application a different time or date without affecting the functionality of your application, you can use this handy code to show the current date in a different culture:
The code shown above can be used on any ASP Application to set a culture. This code when executed, shows the US date format: 07/04/2014 and also the German date format: 07/04/2014.
If your application is going to be used in a region with different date format, this is how you should change it. Failing to do this will make your application crash, if you are asking the user to enter a date. This is the best way to avoid this situation and thus ensuring the health of our servers.
This concludes Formatting Date for a Specific Culture in ASP.
Looking for quality ASP Web Hosting? Look no further than Arvixe Web Hosting!
Happy Hosting!
Rodolfo Hernandez
Can u show how to do this in Classic ASP ?
Yes, I am writing a new article on that!