Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a date field named SOME_DATE with value as 'Fri Mar 17 00:00:00 GMT 2016'.
I want to read this as 17/03/2016 00:00:00 GMT
To convert the date format i have used the below format:
Timestamp(Timestamp#(SOME_DATE,'WWW MMM DD hh:mm:ss [GMT] YYYY'),'DD/MM/YYYY hh:mm:ss [GMT]')
But i don't know what will come in place of [GMT], I have tried TZ , .[fff] but none of them worked.
So requires an expert help.
It would be great if anyone of you can help me out with this.
Thanks and Regards,
Anjali Gupta
Hi Anjali,
Try,
=Date(Date#(Replace(Mid('Fri Mar 17 00:00:00 GMT 2016',5),' GMT ',' '),'MMM DD hh:mm:ss YYYY'),'DD/MM/YYYY hh:mm:ss') & ' GMT'
Date(Date#(Replace(Mid(DateField,5),' GMT ',' '),'MMM DD hh:mm:ss YYYY'),'DD/MM/YYYY hh:mm:ss') & ' GMT' as NewDateField
You can only use the 'WWW' in formatting functions and not in interpretation functions. Also 'GMT' seems not supported format in Qlikview. Check Henric's reply (see comments section ) in below link.
Hope this helps you.
We have a functionConvertToLocalTime using which you can easily convert time in various timezone to your required format
Eg:ConvertToLocalTime(UTC(),'Place')
chk dis too
Hello Chanty 4u,
I don't want to convert the time zone. I want qlikview to read GMT as timezone
Like in the date format :
DD is the date
MMM is the month as Jan. Feb,Mar...
Same way what is the format to specify that GMT is a timezone in the date.
Regards,
Anjali Gupta
Hi Anjali,
Try,
=Date(Date#(Replace(Mid('Fri Mar 17 00:00:00 GMT 2016',5),' GMT ',' '),'MMM DD hh:mm:ss YYYY'),'DD/MM/YYYY hh:mm:ss') & ' GMT'
Date(Date#(Replace(Mid(DateField,5),' GMT ',' '),'MMM DD hh:mm:ss YYYY'),'DD/MM/YYYY hh:mm:ss') & ' GMT' as NewDateField
You can only use the 'WWW' in formatting functions and not in interpretation functions. Also 'GMT' seems not supported format in Qlikview. Check Henric's reply (see comments section ) in below link.
Hope this helps you.
Thanks a lot Tamil Nagaraj for the knowledge and also for helping me.
Regards,
Anjali Gupta
Hi Ashwani Kumar,
Thanks for your reply.
I don't want to convert date to a time zone instead i want the date to be in my format instead of the format provided to me.
Regards,
Anjali Gupta