Reading JotForm submission date from Google spreadsheet in Javascript

  • resilico
    Asked on September 10, 2015 at 8:29 AM

    Hello,

    I read JotForm submission data from a Google Spreadsheet, using Javascript. The submission date is shown in the Spreadsheet like a regular date/time, but when reading it in Javascript it shows up as a fraction, like 42125.61320601852. 

    When I try to convert this fraction using regular Javascript tools, it is translated into a date/time a few hours before January 1st, 1970.

    How can I convert submssion dates to a normal date/time strings?

     

    Kind regards,

    Nathan Moked,

    the Netherlands

     

     

  • KadeJM
    Replied on September 10, 2015 at 11:50 AM

    To my understanding you are attempting to read your submission data in your google spreadsheet using javascript which is converting the date|time to a fraction.

    What form is this for? I see you have several forms. Can you provide us a link or the name of the form that you are having this issue on? 

    Also, how do you have your script set to read it? And how are you trying to read it?

    Have you tried using zeros in front of the date format? That usually prevents the date from being converted into a fraction in some cases.

    Also, this can happen if you have your Spreadsheet set to replace text which is known to convert your data into fractions.

  • resilico
    Replied on September 11, 2015 at 10:46 AM
    I can circumvent the problem.
    Kind regards,
    Nathan Moked,
    The Netherlands
    Op 10 sep. 2015 17:48 schreef "JotForm Support
    Forum<jotform@jotform.com>"
    :
    ...
  • Kiran Support Team Lead
    Replied on September 11, 2015 at 3:34 PM

    Great!! Glad you find a workaround for the issue that you are experiencing. Please do not hesitate to get in touch with us if you need any further assistance. We will be happy to help.

    Thank you for using JotForm!!