Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
didierodayo
Partner - Creator III
Partner - Creator III

Convertolocaltime returning wrong time of the day

Hello,

I don;t think this script is working properly. any ideas why it is returning pm instead of AM?

ConvertToLocalTime(Timestamp(Now()),'GMT+02:00')

Right now I know it is AM in Paris for example.

Thanks

1 Solution

Accepted Solutions
techvarun
Specialist II
Specialist II

Yes, Correct.

try and let us know the result

Thanks,

Varun

View solution in original post

13 Replies
devarasu07
Master II
Master II

Try like this

=localtime ('GMT+02:00')

Anil_Babu_Samineni

Perhaps you need to chance it as local first and then convert into needed like below

ConvertToLocalTime(UTC(Timestamp(Now())),'GMT+02:00')

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
didierodayo
Partner - Creator III
Partner - Creator III
Author

Hi Devarasu,

I am trying to convert from my local time to the time to the Time in Paris.

example:

Local time : 2017-10-20 8:05:06 PM

I want to convert that to the time in Paris.

Thanks

Anil_Babu_Samineni

From hello one example is there related paris. Have you tried that

‎help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/DateAndTimeFunctions/converttolocaltime.htm

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
prma7799
Master III
Master III

Hi Anil ,

Can you please brief this

"ConvertToLocalTime(UTC(Timestamp(Now())),'GMT+02:00')"

What UTC stands for and how it is work ....

didierodayo
Partner - Creator III
Partner - Creator III
Author

Sorry Anil,

When I replaced the Timestamp(Now()) with my timestamp field name it still returns the same value.

ConvertToLocalTime(<mytimestampfield>,'GMT+02:00')  return the time in  paris now although my fied value is 2017-10-20 8:05:06 PM

jonathandienst
Partner - Champion III
Partner - Champion III

What UTC stands for and how it is work ....

https://www.google.co.za/search?q=UTC

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anil_Babu_Samineni

That means, first you need to convert your now() function to local then convert into needed

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