Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
haymarketpaul
Creator III
Creator III

Formatting Datetimes

I am wanting to format Datetimes that look like this

2005-10-28T15:28:24Z

into this

28-10-2005 15:28:24

i thought this might work but doesn't seem to return anything?

Timestamp(Timestamp#(Trim(member.BouncedSince),'YYYY-MM-DDThh:mm:ssZ'),'DD-MM-YYYY hh:mm:ss') as BounceDateTime

Am i doing something wrong or is there a better way?

1 Solution

Accepted Solutions
fvelascog72
Partner - Specialist
Partner - Specialist

With PurgeChar will be something like this:

Timestamp(Timestamp#(PurgeChar(member.BouncedSince,'TZ'),'YYYY-MM-DD hh:mm:ss'),'DD-MM-YYYY hh:mm:ss')

View solution in original post

6 Replies
fvelascog72
Partner - Specialist
Partner - Specialist

Hi,

Before applying timestamp format you could use purge to eliminate Z and T.

haymarketpaul
Creator III
Creator III
Author

Thanks for reply i've used this for now which is very similar to your suggestion.

Timestamp(Timestamp#(Trim(replace(replace(member.BouncedSince,'T',' '),'Z','')),'YYYY-MM-DD hh:mm:ss'),'DD-MM-YYYY hh:mm:ss')

Not applicable

Hi Paul,

Could you please try this:

=timestamp#(Replace(Replace('2005-10-28T15:28:24Z','T',' '),'Z',''),'YYYY-MM-DD HH:MM:SS')

Thanks!

fvelascog72
Partner - Specialist
Partner - Specialist

With PurgeChar will be something like this:

Timestamp(Timestamp#(PurgeChar(member.BouncedSince,'TZ'),'YYYY-MM-DD hh:mm:ss'),'DD-MM-YYYY hh:mm:ss')

haymarketpaul
Creator III
Creator III
Author

Thanks bit tidier than my effort

Not applicable

PFA