Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to display date in a cell using apps script

I have an apps script(for google sheets) that I would like to schedule everyday. How to I add a timestamp(preferably in PST) to indicate to users the last updated time? Example-In cell B2 of the tab called "Overview", I would like the following timestamp: "2/25/2022 02:03:54 PST"

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Add to your script

SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Overview').getRange('B2').setValue(new Date())

and défine in the sheet the format you need

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading