Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts
i want to add 45 days to my existing field
Hi!
LOAD Emp_Id,
Emp_Name,
Type,
date(Emp_Date,'MM/DD/YYYY')as Emp_Date,
if(Type='Permenant',date(Emp_Date+45),date#('01/01/2020','MM/DD/YYYY')) as Change_Emp_Date
FROM
(ooxml, embedded labels, table is Sheet1);
Your dates are actually string in sample, you need to convert them to proper dates. Try like:
if(Type='Permenant', Date(Date#(Emp_Date, 'DD/MM/YYYY')+45)),MakeDate(2020,1,1)) as Change_Emp_Date
try like this :
Emp:
LOAD
Emp_Id,
Emp_Name,
Type,
Emp_Date
FROM
Book2.xlsx
(ooxml, embedded labels, table is Sheet1);
LOAD Emp_Date,
if(Type='Permenant',Date#(date(Emp_Date+45)),date(MakeDate(2020,01,01),'DD-MM-YYYY')) as Change_Emp_Date
// Interval(Change_Emp_Date-Emp_Date,'DD' ) as Diff
Resident Emp;
please find the attachment for the solution