Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
what does the function daylightsaving do???????????
Daylight Saving Time (or summertime as it is called in many countries) is a way of getting more light out of the day by advancing clocks by one hour during the summer. During Daylight Saving Time, the sun appears to rise one hour later in the morning, when people are usually asleep anyway, and sets one hour later in the evening, seeming to stretch the day longer.
In Qlikview it returns the current adjustment for daylight saving time, as defined in Windows.
The manual it reads: returns the current adjustment for daylight saving time as defined in Windows.
The Eastern Time Zone (me) is currently in Daylight Savings Time so my system returns 1 hour.
In the load below, loadtime has DST hour figured in. The columns adding and subtracting DST would be an hour before and after the actual time here but I left them as an example
load
loadtime,
num(dls) as num_dls, // the fraction of the day returned by the function ( = 0.0416.....)
num(dls)*1440 as [num_dls*1440], // the fraction of the day * the number of minutes in a day ( = 1 hour)
Date(loadtime + dls, 'MM/DD/YYYY hh:m:ss') as [lt+dls], // adding daylight savings hour
Date(loadtime - dls, 'MM/DD/YYYY hh:m:ss') as [lt-dls] // subtracting daylight savings hour
;
load
now() as loadtime,
daylightsaving() as dls
autogenerate 1;