- Posts: 35
- Thank you received: 0
Adding Months to Date
8 years 7 months ago #12492
by gia
Adding Months to Date was created by gia
How to add months to a date? When number of months and date are stored as two columns and have different values? I am trying to use a calculation but not getting the expected output.
Please Log in or Create an account to join the conversation.
8 years 7 months ago #12493
by admin
Mike
ETL Architect
Replied by admin on topic Adding Months to Date
This one works
begin
result:=IncDateS([F001],'DDMMYYYY','MONTH',[F002]);
end;
begin
result:=IncDateS([F001],'DDMMYYYY','MONTH',[F002]);
end;
Mike
ETL Architect
Please Log in or Create an account to join the conversation.
8 years 7 months ago #12499
by gia
Replied by gia on topic Adding Months to Date
I am getting an error type mismatch, please suggest.
Please Log in or Create an account to join the conversation.
- Peter.Jonson
-
- Offline
- Platinum Member
-
8 years 7 months ago #12500
by Peter.Jonson
Peter Jonson
ETL Developer
Replied by Peter.Jonson on topic Adding Months to Date
Nothing wrong with that, 481 is clearly not the date therefore it is not possible to add month to it
Peter Jonson
ETL Developer
Please Log in or Create an account to join the conversation.
8 years 7 months ago #12501
by gia
Replied by gia on topic Adding Months to Date
So our input is date value "14032003" (ddmmyyyy format) and we need to add 481 months to it.
Please Log in or Create an account to join the conversation.
- Peter.Jonson
-
- Offline
- Platinum Member
-
8 years 7 months ago #12502
by Peter.Jonson
Peter Jonson
ETL Developer
Replied by Peter.Jonson on topic Adding Months to Date
Yes you are right, we are lookig at it now
Peter Jonson
ETL Developer
Please Log in or Create an account to join the conversation.