Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qvqfqlik
Creator
Creator

timestamp

Please help with how to get local time zone in the timestamp

I used ConvertToLocalTime(now())  , but this doesnt seem to be working

eg: 10/19/2017  8:15 AM  EST

21 Replies
Anil_Babu_Samineni

This is correct one only, I believe. Can you check online about CST time live??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qvqfqlik
Creator
Creator
Author

time is correct ... but I want the word zone 'CST' /'EST'  at the end dynamically  based on user system time

Anil_Babu_Samineni

Try to use If .. else .. condition for each of zone of place.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qvqfqlik
Creator
Creator
Author

Hi ,

I am trying to print as

10/19/2017 10:00 AM CST

I also need to print zone 'CST or EST ' etc based on user system time

can you please tell how to achieve this

ConvertToLocalTime  is simply giving me  10/19/2017 10:00 AM

also localtime() , now() , today() same results

qvqfqlik
Creator
Creator
Author

I can do timezone()  ...but this gives as  GMT-6

but I want to actullay print the timezone at the end like 'cst /cdt/est/edt/pst/pdt' etc

dynamically anywhere in the world timezones

MK9885
Master II
Master II

As Anil mentioned maybe use

=if(LocalTime()=LocalTime(), LocalTime() & ' CST',

if(LocalTime()=LocalTime(), LocalTime() & ' EST',

if(LocalTime()=LocalTime(), LocalTime() & ' PST')))

Anil_Babu_Samineni

This should be like below

=Pick(Match(FieldName, 'CST', 'EST', 'PST', ''), ConvertToLocalTime(UTC(Now()), 'GMT-05:00'),ConvertToLocalTime(UTC(Now()), 'GMT-06:00'),ConvertToLocalTime(UTC(Now()), 'GMT-07:00'), ....)


OR

Here, If we use simply =Now() & 'Text' - It may reflect as per zone ...

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qvqfqlik
Creator
Creator
Author

not hardocding

time zone should be anywhere in the world, not limited to cst,est,pst

when the daylight time changes it should automatically be cdt,edt,pdt ...so this shoul dbe dynamic based on system time

MK9885
Master II
Master II

Weird business users you have... who doesn't know which time zones they are in?

Hard coding seem to be he only option

use either of the codes in your script to create a new field and hard code each destination this app is used.

if(LocalTime()=LocalTime(), LocalTime() & ' CST',

if(LocalTime()=LocalTime(), LocalTime() & ' EST',

if(LocalTime()=LocalTime(), LocalTime() & ' PST')) as LocalTime

And use LocalTime in Front end as Filter with no caption....

Anil_Babu_Samineni

Ok, What are you using in text box to get there Date and display the image ..

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful