I have a tab in sheets that collects dates from a scheduling application. All the values in Appointments!C:C are dates. I am trying to bring those dates to another tab, but some of the values seem to be converting into non-dates, while some stay as dates.
i am using the following script:
if(AppWO==OpenWO)
{
var Appdate1 = new Date(AppRange[i][3]) // this gets the date value from sheet ss1
var DateString1 = ("0" + Appdate1.getDate()).slice(-2) + "-" + ("0"+(Appdate1.getMonth()+1)).slice(-2) + "-" + Appdate1.getFullYear() //this breaks up and reforms the value
ss0.getRange(j+2,24,1,1).setValue(DateString1) //this puts the date in sheet ss0
}
The problem is that 'DateString1' on sheet ss0 seems to not always be a date value. Do I need to do something differntly to use setValue() when working with dates?