Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

How to add days to Existing date Field ?

Hi Experts

I am having the Employee details ,

Here i want to add 45 days to existing date field like (Create one more field like "Due Date")

Condition should be like as following :

If Benefit Type is ‘Permanent’ then   Date + 45 days else 01/01/2020

How we can achieve this one ?


I am attaching sample application and Excel File

Thanks

Madhu

6 Replies
Highlighted
MVP
MVP

Re: How to add days to Existing date Field ?

Date(DateField+45) as [Due Date]

In qv timestamp, 1=1 day

1/24 = 1 hour

1/24/60 =  1 minute ...

Highlighted
Creator
Creator

Re: How to add days to Existing date Field ?

Hi Tresesco

Thanks for your reply

I want to implement the following if condition

If   Type is ‘Permanent’ then   Date + 45 days else 01/01/2020

Highlighted
MVP
MVP

Re: How to add days to Existing date Field ?

Try like:

If( Type='Permanent', Date(Date+45), MakeDate(2020,1,1)) as [Due Date]

Highlighted
Master III
Master III

Re: How to add days to Existing date Field ?

Here is the changed file

Highlighted
Specialist
Specialist

Re: How to add days to Existing date Field ?

As Tresesco suggested,

Try this..

T1:

LOAD Emp_Id,

     Emp_Name,

     Type,

     Date,

     if(Type='Permenant', Date(Date+45), MakeDate(2020,1,1)) as New_Date

    

FROM

[YourPath\Book2 (2).xlsx]

(ooxml, embedded labels, table is Sheet1);

-Sreeni

Highlighted
Creator
Creator

Re: How to add days to Existing date Field ?

Hi Tresesco

Thanks for Your reply

In my application Days are not adding to my 'Change_Emp_Date' field

here  i am attaching sample excel file and application