Getting time from a cell in Google Spreadsheet

Posted by lostInTransit on Stack Overflow See other posts from Stack Overflow or by lostInTransit
Published on 2010-06-07T13:27:52Z Indexed on 2010/06/07 13:32 UTC
Read the original article Hit count: 143

Hi

I have created a Google Spreadsheet form in which for one of the fields I get the time (hh:mm:ss) in 24-hour format.

I am using Google Apps Scripts to read values from this spreadsheet and put it into another file. But the other file gets the entire date (don't know from where) and shows a date from 1899. Also the time is shown in PDT (not my time zone). Even the time it prints is not correct

How do I

  1. read the column value as a string and put it in the other file OR
  2. get just the time from the column value (and the correct time)

I am using a simple row[0][3] to get the values from an array after doing range.getValues()

Thanks.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about google-apps-script