I've a Date column in 'dd/mm/yyyy' format and Time column in 'HH:MM AM/PM' format in Google App spreadsheet. In app script, I want to join these 2 values as a datetime. How can I do this?
Example- date : 13/12/2010, time : 4:30 PM Then I want to get a combined value like '13/12/2010 4:30 PM' as a datetime object.
I tried to parse date and time separately using getYear, getDay JS functions. And created a new date using
new Date(year, month, day, hours, minutes)
But for some reason time '4:30' is being shown as a full weird date like 30 Nov 1899 10:30AM. I can accurately extract year, day and month but not hours and minutes.
Please help. Thanks.