Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In a data I have a date column and number of Year column. Now I want to add number of Yer columns into date column to arrive at a final date. For E.g.
Date :- 01/01/2003 Year = 15 Then Final Date is 01/01/2018
Date :- 15/04/2010 Year = 25 Then Final Date is 15/04/2035
How I can achieve this.
Thanks in advance.
@P_Kale you can do it in your load script
Load PolicyStartDate,
Year,
AddYears(PolicyStartDate,Year) as PolicyEndDate
FROM Table
AddYears(Date,Year)
Hi,
Thanks for your reply.
But I have list of policies for which i need to calculate.
can you please share sample data what you want exactly
Hi,
can you share with us a little example please?
For a better undestanding of problem.
if I understand correctly you want to sum number of years in a column with data.
For do this this is a possible solution:
=Text(Year(Date( Date , 'MM/DD/YYYY'))+ NumberOfYear )
let me know if that was what you were looking for.
Thanks
@P_Kale you can do it in your load script
Load PolicyStartDate,
Year,
AddYears(PolicyStartDate,Year) as PolicyEndDate
FROM Table
this works perfectly @Kushal_Chawda , thanks
Check this years count added as of my understanding
T:
Load *,
Replace(Olddate,Right(Olddate,4),updatedyear) as updatedDate;
Load *,
Text(Year(Date( Olddate , 'MM/DD/YYYY'))+ count ) as updatedyear ;
Load *,
Date(Date#(mydate,'DD/MM/YYYY'),'MM/DD/YYYY') AS Olddate;
Load * Inline [
mydate, count
02/05/2015, 10
02/05/2011, 10
02/05/2013, 10
];
Drop Field mydate;
Thanks for your help @Kushal_Chawda It is working.