6
Reply

how to update system date in asp

Srinivas Rao

Srinivas Rao

Mar 1 2016 8:49 AM
372
hi,
i created a gridview in ASP, where as i kept one column as "last updated date"  of an employee.
in aspx  code i wrote like dis  cmd.Parameters.Add("@LastUpdatedDate", DateTime.Now);
 
 wen ever i inserting data the gridview is showing current date and time. 
wen ever i try to update the date and time are not yet changing.
 
dis is the  query i wrote 
SelectCommand="SELECT * FROM [Employees] order by lastupdateddate desc"
UpdateCommand="update [Employees] Set [EmpId]=@EmpId,[FirstName]=@FirstName,[MI]=@MI,[LastName]=@LastName,[DOB]=@DOB,[DOJ]=@DOJ,[EmailP]=@EmailP,[EmailW]=@EmailW,[PhoneM]=@PhoneM,[PhoneH]=@PhoneH,[PhoneW]=@PhoneW,[Address]=@Address,[Country]=@Country,[State]=@State,[City]=@City where [EmpId]=@EmpId" 
 
pls reply,
  

Answers (6)