MySqlCommand
Query was working fine before writing .AddHours(3.5) , but after writing this it is giving error . I want to add(3.5)
ThanksmyCommand = new MySqlCommand("Insert into hs_hr_attendance (attendance_id,employee_id,punchin_time,punchout_time,out_note,status) values(" + 10 + "," + empno + "," + "Now().AddHours(3.5)" + "," + "NULL" + "," + "NULL" + "," + '2' + ")", con);
myCommand.ExecuteNonQuery();

VulpesRank #55 · 29.2K reputationPosted Sep 7, 2011, 5:38 AM EDT
"SubTime(Now(), '03:30:00')"
VulpesRank #55 · 29.2K reputationPosted Sep 6, 2011, 9:18 AM EDT
Jagjit Saini166 reputationPosted Sep 6, 2011, 8:05 PM EDT
THough it is O.K . If i want to subtract then how it is done.
See when i have entered through another software it shows : 2011-09-07 06:00:00 (Time was 09:30)
But through Asp.net it is showing me 2011-09-07 13:00 . It means it is adding , in above case it is minus .
Thanks
Jagjit Saini166 reputationPosted Sep 6, 2011, 9:25 PM EDT