I am doing this to save a DateTime in the MySQL database but when stored, the value is 2011-10-30 06:01:07. 06 is supposed to be pm, not am:
startTime.ToString("yyyy-MM-dd hh:mm:ss");
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simply do this
where
HH(capital H) shows 24 hours format. So when you try saving2011-10-30 06:01:07it suppose to beamand when you wantpmyou should save2011-10-30 18:01:07