Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

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
Chanty4u
MVP
MVP

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

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

Chanty4u
MVP
MVP

Not applicable
Author

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

tamilarasu
Champion
Champion

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.

Not applicable
Author

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

Regards,

Anjali Gupta

ashwanin
Specialist
Specialist

Hi,

might be this link help you.

Local Time.qvw

Not applicable
Author

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