Hi
MySqlCommand myCommand = new MySqlCommand("Insert into attendance (attendance_id,employee_id,punchin_time) values(" + 10 + "," + empno + "," + "Now()" + ")", con);
myCommand.ExecuteNonQuery();
IT is working fine . DateTime is correctly stored in Database . I want to know whether this will store Server Date&Time or Client Machine . I want Server Date&Time.
Thanks
Insert Statement
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

NarayanRank #8,477 · 221 reputationPosted Sep 5, 2011, 11:46 PM EDT
Prabhu RajaRank #861 · 2.6K reputationPosted Sep 6, 2011, 1:06 AM EDT
You doesn't mention which database you're using. I think you using MySql Database.
For MySql Database your Select Query (now() function) Will Store Server Date and time, or if you're using Sql Server Database ,then use GetDate() funtion .