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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date Time issue

Hi All,

   I am having a date field such as " 201-04-25T01:53:1Z" From this I need extract only Date field. I have used Purgechar(Datefield,'T,Z').

But it dint worked. Any one having idea on this

-Jay

5 Replies
JonnyPoole
Former Employee
Former Employee

Is there a missing 4th digit like....2014-04-25T01:53:1Z"  ??


You could trythis:


date(date#(  left(Datefield,10) ,'YYYY-MM-DD'))

SunilChauhan
Champion II
Champion II

date(date#( Datefield ,'DD-MM-YYYY'))

Sunil Chauhan
PrashantSangle

Hi,

Try like

date(date#(Purgechar(Datefield,'T,Z'),'YYYY-MM-DDhh:mm:s'),'YYYY-MM-DD hh:mm:ss')

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

That's correct, except that PurgeChar() only takes 2 parameters, so it should read:

     date(date#(Purgechar(Datefield,'TZtz'),'YYYY-MM-DDhh:mm:s'),'YYYY-MM-DD hh:mm:ss')


HTH

Jonathan



Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
PrashantSangle

Hi,

my bad syntax error . You are write HTH.

Thanks for correction

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂