Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
How store database date formate: 24-sep-12:HH:MM:SS (system current date time)
Posted

1 solution

You are taking the wrong approach. The database is storing the dates in it's own format. If you want to use this one, you need to parse it as DateTime to store in the database and use the formatter to display it this way.

You have all the formatting options here: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx[^]

According to it you need something like this: "dd-MMM-yy:hh:mm:ss". And don't forget to use the proper locale to have the month name as you need.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900