As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
var myDate = new Date('11/10/2009'); var newDate = myDate.format("isoDateTime");
function padzero(n) { return n < 10 ? '0' + n : n; } function pad2zeros(n) { if (n < 100) { n = '0' + n; } if (n < 10) { n = '0' + n; } return n; } function toISOString(d) { return d.getUTCFullYear() + '-' + padzero(d.getUTCMonth() + 1) + '-' + padzero(d.getUTCDate()) + 'T' + padzero(d.getUTCHours()) + ':' + padzero(d.getUTCMinutes()) + ':' + padzero(d.getUTCSeconds()); } function fnToISO(dt) { var nDate = new Date(dt); return(toISOString(nDate)); }
var myDate = args.createdFrom; fnToISO(myDate); // fails - NaN-NaN-NaN