Skip to main content
Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for 
Search instead for 
Did you mean: 
madhubabum
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
tresesco
MVP
MVP

Date(DateField+45) as [Due Date]

In qv timestamp, 1=1 day

1/24 = 1 hour

1/24/60 =  1 minute ...

madhubabum
Creator
Creator
Author

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

tresesco
MVP
MVP

Try like:

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

sujeetsingh
Master III
Master III

Here is the changed file

SreeniJD
Specialist
Specialist

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

madhubabum
Creator
Creator
Author

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