Click here to Skip to main content
15,886,666 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
See more:
Hi,

am using datetimepicker in my winforms application.

i set bthe format as custom and
custom format:yyyy-MM-ss hh:mm:ss

when i observe it in ui, it's showing correctly. but in database it's saving AM,Pm also. but AM,PM is not correct


If i save at afternoon 1:14 PM,

it's saving in database as 1:14 PM.

how to solve it.
Posted
Comments
phil.o 24-Feb-14 3:34am    
Where is the problem? The only important thing is that DateTime values are stored correctly in the database. Anything else relevant to the display format of your DateTime values does not have anything to do with your database.
Database is here to store the values; anything relevant to the presentation format of these values takes place in the user interface part, not the database one.
Member 10263519 24-Feb-14 4:42am    
ok, it's working by tabing hour as 24 -hour format.(HH)

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