1

I selected tomorrow's date (8/21/2014) from the data picker field of a Google Form submission, and the value "41872" is returned in the spreadsheet.

What format is this date format?

I need to convert this date format to the MM/dd/yyyy format using script, as formatting the Date column using the Format menu only updates the rows that are currently available...not the new rows that will be there when new form submissions come in.

How do I make this conversion?

  • Have you tried picking some *other* values, e.g. today's date, the day after tomorrow, maybe Jan 1st 2015? It's a lot easier to work things out based on multiple data points than a single one... – Jon Skeet Aug 20 '14 at 20:36
  • Two days later (8/23/2014) results in a value of "41874". – Theo Ramsey Aug 20 '14 at 20:50
  • 1
    This fixed: sheet.getRange(rowNum,ColNum).setNumberFormat("MM/dd/yyyy"); – Theo Ramsey Aug 20 '14 at 21:29
  • This post explains the issue in details :http://stackoverflow.com/questions/24983369/cannot-get-date-from-google-sheet-filled-by-google-forms/24985253#24985253 – Serge insas Aug 20 '14 at 21:37

2 Answers2

0

I am not sure, but your issue seems to be very basic. Its about the cell formatting as like we do in Ms Excel.
For Google spreadsheet inorder to format a cell or a range,
1. Select the Range
2. On menu, Go To Format->Number->Date (and then select the required format)

Does this works?

0

I had the same confusion. All you need to do is just change the format from the menu Format->Number->Date & Time