Set datetime cell to current time when a row is edited
Set datetime cell to current time when a row is edited
Hi,
I am looking for hints how to do the following. Thanks in advance.
In this example link, I would like to have the Modify date automatically set to current date after the row is created or edited, without including it in the edit form.
This question has accepted answers - jump to:
This discussion has been closed.
Answers
If this is a MySQL database, you need a timestamp column with a default value of "CURRENT_TIMESTAMP" and an attribute of "on update CURRENT_TIMESTAMP".
Modifying any field will then add current timestamp to the row.
Thank you so much. It works like a champ.
Hi,
How we can do it in a sql database? should I create a trigger on my table?
Hi @baharptalayi@gmail.com ,
Yep, that's a good way to go. This SO thread has some details,
Cheers,
Colin
Thanks colin, it works well.