Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
clau2003cos
Contributor III
Contributor III

Horas

Bom dia

como faço para gerar um calendario de horas 00:00:00 as 23:59:59 por dia


Ex:


19/11/2015 00:00:01

19/11/2015 00:00:02

......

19/11/2015 23:59:59

20/11/2015 00:00:00

20/11/2015 00:00:01

.....

Grato!!!

Labels (1)
1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

Calendar with time (timestamp)

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

Time_Stamp_Table:

LOAD DayStart(TimeStamp('01/01/2015 00:00:00' + (RecNo()/86400) + (IterNo() -1))) AS AddedDate, 

     TimeStamp('01/01/2015 00:00:00' + (RecNo()/86400) + (IterNo() -1)) AS AddedTimeStamp

AUTOGENERATE 1439 WHILE Num(Date('01/01/2015') + IterNo() -1) <= Num(Date('31/01/2015'));

Capture.JPG

You can create the variable instead of static time value based on your need and put that into the timestamp function.

View solution in original post

2 Replies
settu_periasamy
Master III
Master III

Hi,

Calendar with time (timestamp)

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

Time_Stamp_Table:

LOAD DayStart(TimeStamp('01/01/2015 00:00:00' + (RecNo()/86400) + (IterNo() -1))) AS AddedDate, 

     TimeStamp('01/01/2015 00:00:00' + (RecNo()/86400) + (IterNo() -1)) AS AddedTimeStamp

AUTOGENERATE 1439 WHILE Num(Date('01/01/2015') + IterNo() -1) <= Num(Date('31/01/2015'));

Capture.JPG

You can create the variable instead of static time value based on your need and put that into the timestamp function.

clau2003cos
Contributor III
Contributor III
Author

Ola!

fiz uma analise e verifiquei que esta carregando da seguinte forma:

01/11/2015 00:00:01

e o ultimo esta

23/11/2015 00:00:00

No caso tem como carregar da seguinte maneira

01/11/201 00:00:00

e o ultimo

22/11/2015 23:59:59

segue o codigo

calendario:

LOAD

TimeStamp($(varMinDate) + (RecNo()/86400) + (IterNo() -1)) AS TempDate 

AUTOGENERATE 86400 WHILE Num($(varMinDate) + IterNo() -1 ) <= Num($(varMaxDate));