3 Replies Latest reply on Feb 21, 2017 12:52 AM by aelgov RSS
    aelgov Apprentice

    Is it possible to format date with milliseconds in TWX?

    Hi,

     

    I tried many options - none works, is there any quick way without parsing it manually?

     

    DateString = "2017-02-20 15:04:39.543"

     

    Option 1:

     

    var sdf = "yyyy-MM-dd HH:mm:ss.sss";

    var dateValue = parseDate(DateString, sdf);

     

    Option 2:

     

    var sdf = "yyyy-MM-dd HH:mm:ss.fff";

    var dateValue = parseDate(DateString, sdf);

     

    Option 3:

     

    var sdf = "yyyy-MM-dd HH:mm:ss.fffZ";

    var dateValue = parseDate(DateString, sdf);

     

    Option 4:

     

    var msec = Date.parse(DateString);

    var dateValue = new Date(msec);