Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
alakazam
New Contributor III

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
Valued Contributor

Re: Move date in calendar

instead of round (FileTime()) as Ldate

try

Date(Floor(FileTime())) as Ldate


2 Replies
aarkay29
Valued Contributor

Re: Move date in calendar

instead of round (FileTime()) as Ldate

try

Date(Floor(FileTime())) as Ldate


alakazam
New Contributor III

Re: Move date in calendar

Thank you, I didnt know this function.

Community Browser