Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Move date in calendar

Hello,

Im using in my srict function FileTime as base for my date. Each date I get three files, from this files I take my data. Then I made new field as Ldate. In sript its:

    [Movements]:

    LOAD

    FileTime(),

    round (FileTime()) as Ldate

As my calendar Im using:

MinMax:

Load

Min(Ldate) as MinDate,

Max(Ldate) as MaxDate

Resident [Movements];

Let vMinDate = Num(Peek('MinDate',0,'MinMax'));

Let vMaxDate = Num(Peek('MaxDate',0,'MinMax'));

TempCal:

Load

DATE($(vMinDate)+RowNo()-1)as TempDate

AutoGenerate

$(vMaxDate)-$(vMinDate)+1;

DROP TABLE MinMax;

"Master Calendar":

Load

TempDate as Ldate,

    Year(TempDate) as Year,

    Month(TempDate) as Month,

    Week(TempDate) as Week,

    Day (TempDate) as Day,

   'Q'& Ceil(Month(TempDate)/3) as Quarter,

   Date (Monthname (TempDate),'YYYY-MM') as "Year-Month",

   Date (Weekname (TempDate)) as "Year-Week"

 

Resident TempCal

Order by TempDate ASC;

But in Application I have two rows moved to Tomorrow. Example: Original and right one is 1.1.2017 for first three rows (in FileTime). But I got in Ldate two rows from three converted as 2.1.2017. (second Januar). Then all my datas is wrong moved two rows forward - and it is problem.

Can anybody help me and tell me, where I made error? In added file is screen from application with wrong converted date. Thank you

1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

instead of round (FileTime()) as Ldate

try

Date(Floor(FileTime())) as Ldate


View solution in original post

2 Replies
aarkay29
Specialist
Specialist

instead of round (FileTime()) as Ldate

try

Date(Floor(FileTime())) as Ldate


Anonymous
Not applicable
Author

Thank you, I didnt know this function.