howto visualize timestamps

Post Reply
HaMo

howto visualize timestamps

Post by HaMo » Mon Nov 10, 2014 2:34 pm

Hi all,
we extracted seconds since 1970 (epoch) from a datastream and wanted to show them human readable.

We tried to use the toDate function with a current (constant) value:

Code: Select all

#PARSER PQL
#RUNQUERY
out = MAP({EXPRESSIONS = [
                .
                .
                .
		['todate(1415621801)', 'Zeitstempel']
	]}, output)
Result is:
Sat Jan 17 10:13:41 CET 1970
Expected:
Mon Nov 10 12:16:41 CET 2014
We are gratefull for any hint.

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: howto visualize timestamps

Post by Marco Grawunder » Mon Nov 10, 2014 2:48 pm

*1000 because toDate expects milli seconds ...

delivers: Mon Nov 10 13:16:41 CET 2014

HaMo

Re: howto visualize timestamps

Post by HaMo » Mon Nov 10, 2014 2:58 pm

Marco Grawunder wrote:*1000 because toDate expects milli seconds ...

delivers: Mon Nov 10 13:16:41 CET 2014
Thanks for the hint, that has been the problem. :-)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest