Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

jblomqvist
Valued Contributor

How to convert Singapore time based field values to UK based time values?

Hello all,

I have a DateTime field which records data in Singapore time.

When analysing the data in the UK it makes little sense to the users so how can I show the same timestamp data but on UK time?

So basically I want conver the following values in UK time:

2019-04-01 03:30:20

2019-04-01 03:35:34

etc

6 Replies
Partner
Partner

Re: How to convert Singapore time based field values to UK based time values?

Partner
Partner

Re: How to convert Singapore time based field values to UK based time values?

I guess you could use ConvertToLocalTime() https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTim...
???
Celebrating my 300 accepted solution in the Qlik Community
???
jblomqvist
Valued Contributor

Re: How to convert Singapore time based field values to UK based time values?

Hi guys,

This almost works.

It appears to show one hour ahead?

For example here in the UK it is 8pm currently, when I use your expression, it's showing as 04:00am Singapore time, but it is actually 3am over there currently.

The clocks just went forward so it's not taking this into account?

Partner
Partner

Re: How to convert Singapore time based field values to UK based time values?


play around with ignore_dst argument
look at the link for details on arguments
not sure if true/false is the right one. (always confused by Daylight savings :-))
Highlighted
jblomqvist
Valued Contributor

Re: How to convert Singapore time based field values to UK based time values?

Hi Dilipranjith,

Sadly that seems to make no difference when I enter true or false as arguments!
Partner
Partner

Re: How to convert Singapore time based field values to UK based time values?

ok. looking more into it the function it may not be what you want as that function converts UTC time to a local (specified in argument) and i believe you want it the other way round. i.e. singapore to uk.

i am not sure now 😞