I entered
MySqlCommand
In punchin_time (DataType Datetime) value is stored as 2011-09-05 22:11:20 (Time is 10.11 PM)
When i enter date through Orange CRM value is stored in same column as 2011-09-05 18:41:00 (Time is 10.11 PM) . In which format it is storimg time in Orange CRM . What i have to do in C# so that it should also display in the same format.
Thanks
myCommand = new MySqlCommand("Insert into attendance (attendance_id,employee_id,punchin_time) values(" + 10 + "," + empno + ",'" + _dt.ToString("yyyy-MM-dd HH:mm:ss") + "')", con);
VulpesPosted Sep 5, 2011, 3:24 PM
You could try adding 3.5 hours to the datetime before you insert it in the database. Hopefully, when you retrieve it, it will then be the correct time for your timezone:
myCommand = new MySqlCommand("Insert into attendance (attendance_id,employee_id,punchin_time) values(" + 10 + "," + empno + ",'" + _dt.AddHours(3.5).ToString("yyyy-MM-dd HH:mm:ss") + "')", con);