Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

Time stamp Format with TimeZone

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

Tags (1)
1 Solution

Accepted Solutions
Highlighted

Re: Time stamp Format with TimeZone

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.


Why don’t my dates work?

Hope this helps you.

View solution in original post

7 Replies
Highlighted
Esteemed Contributor III

Re: Time stamp Format with TimeZone

We have a functionConvertToLocalTime using which you can easily convert time in various timezone to your required format

Eg:ConvertToLocalTime(UTC(),'Place')

Highlighted
Esteemed Contributor III

Re: Time stamp Format with TimeZone

Highlighted
Not applicable

Re: Time stamp Format with TimeZone

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

Highlighted

Re: Time stamp Format with TimeZone

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.


Why don’t my dates work?

Hope this helps you.

View solution in original post

Highlighted
Not applicable

Re: Time stamp Format with TimeZone

Thanks a lot Tamil Nagaraj for the knowledge and also for helping me.

Regards,

Anjali Gupta

Highlighted
Valued Contributor

Re: Time stamp Format with TimeZone

Hi,

might be this link help you.

Local Time.qvw

Highlighted
Not applicable

Re: Time stamp Format with TimeZone

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