unix to date/time
Posted: 04 Feb 2018 12:59
Hi,
Howto convert this string in to Date?
1515769353
Source is the Nokia Health Api.
Once AM says "can not convert value 'null' to number"
next time i tried
"Unparseable date".
What's the right syntext?
Tried:
getDate(variable, "yyyy.MM.dd");
getDate(variable,dateformat,"dd.MM.yyyy HH:mm:ss");
With and without multiplication *1000 to convert it to ms.
Also tried "toNumber", no go.
Anyone?
EDIT:
OK, brrrrrrr
think i have do the multiplication with 100 instead of "1000".
time=1515769353*1000;
time_formatted = "{time, dateformat, dd.MM.yyyy HH:mm:ss}";
this do the job.
Howto convert this string in to Date?
1515769353
Source is the Nokia Health Api.
Once AM says "can not convert value 'null' to number"
next time i tried
"Unparseable date".
What's the right syntext?
Tried:
getDate(variable, "yyyy.MM.dd");
getDate(variable,dateformat,"dd.MM.yyyy HH:mm:ss");
With and without multiplication *1000 to convert it to ms.
Also tried "toNumber", no go.
Anyone?
EDIT:
OK, brrrrrrr
think i have do the multiplication with 100 instead of "1000".
time=1515769353*1000;
time_formatted = "{time, dateformat, dd.MM.yyyy HH:mm:ss}";
this do the job.