Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

ISO 8601 timedefinition summer winter time

We need to have a good formula to show the time in the iso 8601 format

YYYY-MM-DDThh:mm:ss+02:00

We are now in Summertime Amsterdam +02:00

we go tho wintertime in october and then we need +01:00

We tried different formula, but non is working.

ConvertToLocalTime

Timezone

This formula give problems in the night at 01:00 + 00:00 hour.

hour(now()) = 0 and  hour(ConvertToLocalTime(UTC(),'UTC')      (local time when reloading the document)

Any suggestions ?

Qlikview version 12

1 Solution

Accepted Solutions
MVP
MVP

Re: ISO 8601 timedefinition summer winter time

I think you need to add Daylightsavings() to Timezone() [latter will return timezone without DST]:

=Interval(Rangesum(TimeZone(),DaylightSaving()),'hh:mm')

edit:

And the correct timezone & DST setting needs to be set in OS

5 Replies

Re: ISO 8601 timedefinition summer winter time

Maybe something like this may hint for a solution:

ConvertToLocalTime(UTC() + daylightsaving(),'Amsterdam')

- Marcus

Not applicable

Re: ISO 8601 timedefinition summer winter time

Hi Marcus, thanks for helping

for some reaon daylightsavings and also timezone keeps giving 1:00 in stead of the current 2:00

any ideas ?

MVP
MVP

Re: ISO 8601 timedefinition summer winter time

I think you need to add Daylightsavings() to Timezone() [latter will return timezone without DST]:

=Interval(Rangesum(TimeZone(),DaylightSaving()),'hh:mm')

edit:

And the correct timezone & DST setting needs to be set in OS

Re: ISO 8601 timedefinition summer winter time

It looked that these expression worked:

ConvertToLocalTime(timestamp,'Amsterdam', true())

If not you could play with it in the attached application.

- Marcus

Not applicable

Re: ISO 8601 timedefinition summer winter time

many thanks this formula works

Community Browser