Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Convert a Num Date Format to a Timestamp

I need to convert a Num Date (41178) into a Timestamp in this Format: 2012-09-26 00:00:00.000

I change my timestamp format like this: SET TimestampFormat='YYYY-MM-DD hh:mm:ss[.fff]';

And my formula is Timestamp(peek('maxdate')) where maxdate is 41178. The result is 2012-09-26 00:00:00 without the .000 at the end.

Can somebody help me in telling me what is the TimestampFormat I have to write in my set up.

Thanks in advance

Patrick

1 Solution

Accepted Solutions
Not applicable

Re: Convert a Num Date Format to a Timestamp

Instead of

SET TimestampFormat='YYYY-MM-DD hh:mm:ss[.fff]'

Try this

SET TimestampFormat='YYYY-MM-DD hh:mm:ss.fff'

It is working


View solution in original post

2 Replies
Not applicable

Re: Convert a Num Date Format to a Timestamp

Instead of

SET TimestampFormat='YYYY-MM-DD hh:mm:ss[.fff]'

Try this

SET TimestampFormat='YYYY-MM-DD hh:mm:ss.fff'

It is working


View solution in original post

Not applicable

Re: Convert a Num Date Format to a Timestamp

Thanks a lot