Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

ghermann
New Contributor II

How to convert pythons time.ctime() to a usable format

Hi,

I have data with timestams in the python time.ctime() format.

Example:

"Tue Jun 19 08:40:07 2018"

How can i "transform" this format in a usable date/time format? I would be very happy about helpful suggestions!

;-)

1 Solution

Accepted Solutions
MVP
MVP

Re: How to convert pythons time.ctime() to a usable format

If you have the date as a string like you show then this will work to interpret the string and convert it into a Qlik date:

=Date#( Mid( FieldOrVariableWithDate ,5,16 ) , 'MMM D hh:mm:ss YYYY' )

2 Replies
MVP
MVP

Re: How to convert pythons time.ctime() to a usable format

If you have the date as a string like you show then this will work to interpret the string and convert it into a Qlik date:

=Date#( Mid( FieldOrVariableWithDate ,5,16 ) , 'MMM D hh:mm:ss YYYY' )

ghermann
New Contributor II

Re: How to convert pythons time.ctime() to a usable format

Great! Thx!

Community Browser