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

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

View solution in original post

5 Replies
marcus_sommer

Maybe something like this may hint for a solution:

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

- Marcus

Not applicable
Author

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 ?

swuehl
MVP
MVP

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

marcus_sommer

It looked that these expression worked:

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

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

- Marcus

Not applicable
Author

many thanks this formula works