For other users who can automatically add the date and time of data insertion.
I just ran into this problem and I changed the code provided by Internet Geeks .
Their code works by updating the specified column, the timestamp is inserted into the same row in another specified column.
What I changed is that I highlighted the date and time, because timestamp is a string, not a date format. Mine was useful for generating graphs.
It works by specifying a column to track changes, and then creating upDate and upTime columns for the date and time, respectively.
function onEdit(event) { var timezone = "GMT+1"; var date_format = "MM/dd/yyyy"; var time_format = "hh:mm"; var updateColName = ""; var DateColName = "upDate"; var TimeColName = "upTime"; var sheet = event.source.getActiveSheet();
Hope this helps people.
source share