
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Timestamp format ("2017-12-21T13:33:25.494Z")
Hi all,
Does anybody know how to write such a timestamp format in Qlik?
"2017-12-21T13:33:25.494Z"
with the T and Z?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
the timestamp you got from by web service?
read below :
The T
doesn't really stand for anything. It is just the separator that the ISO 8601 combined date-time format requires. You can read it as an abbreviation for Time.
The Z
stands for the Zero timezone, as it is offset by 0 from the Coordinated Universal Time (UTC).
Both characters are just static letters in the format, which is why they are not documented by the datetime.strftime()
method. You could have used Q
or M
or Monty Python
and the method would have returned them unchanged as well; the method only looks for patterns starting with %
to replace those with information from the datetime
object.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yep; you saw it right !
It's from a web service !
So
timestamp(Now(),'YYYY-MM-DD hh:mm:ss.ff')
would do the trick?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes it will i think.
in python here the script
x.strftime("%Y-%m-%dT%H:%M:%S%Z")
'2015-03-26T10:58:51'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
or you can try with
purgechar() in timestamp to exclude that then you will get exact output.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to send data to the web service not pull from it.
So I have to format my dates the right way to send them

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SET TimestampFormat='YYYY-MM-DD h:mm:ss[.fff]';
timestamp(date(left(TIMESTAMPFIELD),10)) & ' ' & mid(TIMESTAMPFIELD,12,8))
as _TIMESTAMP
