Skip to content
Advertisement

Avoid formatDate error in Google Apps Script

ive got a function to storage in an array and loop data from a document. Inside this one, there are cells with dates in format dd/mm/yyyy…but when I send it by email, appears like Wed Jan 01 2014 00:00:00 GMT-0300 (ART)

I used inside this function, a formatDate method but through me an error Cannot find method formatDate(string,string,string). How I can get the right formated date?

JavaScript

Advertisement

Answer

You need to convert the string to date first before calling the formatDate() method.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement