1970 date appearing in Time field calculation

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Script Talk 1970 date appearing in Time field calculation

Tagged: 

Viewing 2 reply threads
  • Author
    Posts
  • October 29, 2019 at 6:50 AM #37529

    Martin Inchley
    Participant

    I’m writing a script to concatenate info from lots of fields, including a Time field, and insert it into a Notes field. The line with data from the Time field includes the date 1st Jan, 1970, before the time. I need it to include the time of day, and no date.

    October 29, 2019 at 7:45 AM #37530

    Daniel Leu
    Participant

    You can use standard Javascript date and time functions for this: https://www.w3schools.com/jsref/jsref_obj_date.asp:

    var date_id = 'fld-xxxx';
    
    var d = record.getFieldValue(date_id);
    console.log(d.toLocaleTimeString());
    October 29, 2019 at 8:29 AM #37533

    Martin Inchley
    Participant

    Thanks, Daniel.

Viewing 2 reply threads

You must be logged in to reply to this topic.