I am working on an app in which I need to show the date when google doc was last edited.
Snapshot Here
I am able to get last modified date through Drive api
But it is different from last edited date for cases when file's metadata (e.g. permission) has changed and content hasn't.
Is there any way to get date when google doc was last edited?
In Google Apps Script there is a DriveApp service that you can use. Something like this will work:
function lastUpdatedOn() {
var FILE_ID = 'FILEID';
return DriveApp.getFileById(FILE_ID).getLastUpdated();
}
The documentation for that is here: https://developers.google.com/apps-script/reference/drive/file#getlastupdated
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With