Modify Stage- DaysSinceFromDate syntax
Moderators: chulett, rschirm, roy
Modify Stage- DaysSinceFromDate syntax
I am trying to count the of days between the Transaction date and the date posted. What is the correct syntax for the modify stage.
NumofDays = DaysSinceFromDate (DatePosted,TransDate)
Thanks.
NumofDays = DaysSinceFromDate (DatePosted,TransDate)
Thanks.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
NumDays:integer=days_since_from_date[source_date](date)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Does the source_date argument of days_since_from_date function accept only hard-coded value? I want to use it but when I pass a date column for source_date, I get the following error. It works though if I use a hard-coded date like "2007-01-01" but this is not the way I want it.
NEW_DATE and TRANSACTION_DATE are my arguments which are both date columns.
-------------------------------------------------------------------------
main_program: Error parsing modify adapter: Error in binding: Parsing parameters "NEW_DATE" for conversion "int32=days_since_from_date[**********](date)": APT_Conversion_DaysSince_Date: Invalid Date [NEW_DATE] used for days_since_from_date type conversion
Expected destination field selector, got: ")"; input:
DIFF = days_since_from_date[NEW_DATE] (TRANSACTION_DATE)
;
[sil/step_il.C:3446]
NEW_DATE and TRANSACTION_DATE are my arguments which are both date columns.
-------------------------------------------------------------------------
main_program: Error parsing modify adapter: Error in binding: Parsing parameters "NEW_DATE" for conversion "int32=days_since_from_date[**********](date)": APT_Conversion_DaysSince_Date: Invalid Date [NEW_DATE] used for days_since_from_date type conversion
Expected destination field selector, got: ")"; input:
DIFF = days_since_from_date[NEW_DATE] (TRANSACTION_DATE)
;
[sil/step_il.C:3446]
luie
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Modify Stage- DaysSinceFromDate syntax
if you are looking for the transformer function , here is a sample of how to use thatvenkat_kp wrote:I am trying to count the of days between the Transaction date and the date posted. What is the correct syntax for the modify stage.
NumofDays = DaysSinceFromDate (DatePosted,TransDate)
Thanks.
DaysSinceFromDate(Inputcol.EffDate, DateToString(CurrentDate(),"%yyyy-%mm-%dd"))
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Given the original request
I do not believe the OP was looking for the Transformer stage function.venkat_kp wrote:What is the correct syntax for the modify stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
The performance has been drastically improved in all 7.x versions. Hence you cannot claim that transformer is "very poor" in performance, unless your using a version lower than 7.x. It still cannot beat modify stage, so I have heard, but its come a long way.gbusson wrote: In the transformer, if the 2nd paramter is not a constant, performance is very poor!
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.