Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have string format as jan'19, How to convert that string into date format?
Thanks & Regards,
Vinod
Hi,
First thing to do is replace ' symbol with something neutral like -, then apply DATE#() function to tell Qlik explicitly that this text is a date. You should get something like below.
DATE#( REPLACE(<YourField>,chr(39), '-'), 'MMM-YY') AS <YourDateField>
You can additionally apply DATE() function on top to convert to your default date format, also note that your Jan'19 will be 01/01/2019.
Hope this helps.
//Andrei
Hi,
First thing to do is replace ' symbol with something neutral like -, then apply DATE#() function to tell Qlik explicitly that this text is a date. You should get something like below.
DATE#( REPLACE(<YourField>,chr(39), '-'), 'MMM-YY') AS <YourDateField>
You can additionally apply DATE() function on top to convert to your default date format, also note that your Jan'19 will be 01/01/2019.
Hope this helps.
//Andrei
date(date,'MMM YY')
date(date#(date,'MMM YY'),'MMM YY')
try
Hi Vinod,
You need to replace ' with - first and then you can proceed, try this :
=Date(Date#(Replace(yourDate,chr(39),'-'),'MMM-yy'),'MM/yy')
-Shubham
So here the single quote (') is something that is annoying you, right? If so, you could use escape sequence, like:
=Date(Date#(YouraDate, 'MMM''YY'))
Note the double single quotes in red. For better understanding, refer : Escape Sequence in Qlik
That means you liked it, but still didn't LIKE it..
Thanks Shubham It worked