I have a column in a Google Spreadsheet that displays dates. The sheet was originally created in Excel, then copied to Google. The column of dates was originally filled using a 7 day step; each date is a Sunday. In the spreadsheet, it is formatted M/D/YYYY (7/5/2015).
I am working on a script wherein the user selects a date cell, and a group of documents is generated based on the information in the subsequent columns of the row that contains the selected date.
The problem is that when the script pulls the value from the date cell, an integer is received, not a date, and thus I cannot use the date as part of the custom documents. (The integer is indeed representative of the correct date when I use the TO_DATE(value) function in another cell, but that function does not work in the script.)
Does anyone know how to convert the integer into a date inside of the script? Is there a function out there that someone has already written?
Thank you very much.