Hi all,
I have a requirement where i have preupdate,main loading job and post update.
My requirement is to stored the current date before main job starts loading and pass this as a parameter to post update job in job sequence.
To achieve this,i have used user variable activity stage between preupdate and main job and created one variable as
CURR_DT=Date()
But when i am passing this variable to post update job parameter
CURR_DT(Type=date)=Curr_Dt_Vrb.CURR_DT sequence is failing at post update flow with error:-
JobControl (@Ofin_Submit_Job): Will execute error activity: Exception_Handle
when i change the data type of parameter CURR_DT(Type=String)=Curr_Dt_Vrb.CURR_DT
it passes the interger value CUR_DT=16894,which is not expected.
Can soneone give a look in this.
How to pass current date in sequence job
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
How to pass current date in sequence job
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Take a look in the manual at how the function behaves:
"Use the DATE function to return the numeric value of the internal system date. Although the DATE function takes no arguments, parentheses are required to identify it as a function.
The internal format for the date is based on a reference date of December 31, 1967, which is day 0. All dates thereafter are positive numbers representing the number of days elapsed since day 0. All dates before day 0 are negative numbers representing the number of days before day 0."
"Use the DATE function to return the numeric value of the internal system date. Although the DATE function takes no arguments, parentheses are required to identify it as a function.
The internal format for the date is based on a reference date of December 31, 1967, which is day 0. All dates thereafter are positive numbers representing the number of days elapsed since day 0. All dates before day 0 are negative numbers representing the number of days before day 0."
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Thanks everyone!
Issue is resolved.
Issue is resolved.
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Hmmm... what did you actually use for the "datehere" part of the posted code?
If you used Date() as mentioned in your first post then the inner IConv is actually doing nothing as the conversion cannot be made, meaning the internal number is passed unchanged to OConv. Actually, sorry but the code as posted doesn't make sense. It takes a string in "YYYY-MM-DD", converts it to an internal date and then converts it back into a string in "YYYY-MM-DD" format.
This would be more appropriate if that output format is what you need:
Code: Select all
Oconv((Iconv(datehere,"D-YMD[4,2,2]")) ,"D-YMD[4,2,2]")
This would be more appropriate if that output format is what you need:
Code: Select all
Oconv(Date(),"D-YMD[4,2,2]")
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers