Hello All,
In my requirement I need to convert a input field(COL1) which is read as String(Varchar(8)) to JulianDay.
Example of Input field value : 20110222
I used the following derivation in the Transformer.
JulianDayFromDate(StringToDate(COL1,"%yyyy%mm%dd") )
I am getting the correct output but found two warnings in the DataStage log.
Warning: Conversion error calling conversion routine date_from_string data may have been lost
Warning: Conversion error calling conversion routine julian_day_from_date data may have been lost
Can you guys please suggest me ways to fix these warnings?
Warnings due to date_from_string,julian_day_from_date fns
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 20
- Joined: Sun Dec 20, 2009 10:46 pm
-
- Premium Member
- Posts: 20
- Joined: Sun Dec 20, 2009 10:46 pm
-
- Premium Member
- Posts: 120
- Joined: Thu Oct 28, 2004 4:24 pm
Try using this to make sure your data is correct.
and reject the row that has invalid date conversions
IsValidDate
Returns whether the given value is valid for the type date.
v Input: testdate (date)
v Output: result (int8)
v Examples. If the column mylink.mydate contains the date 2011-09-13, then the following
function returns the value 1.
IsValidDate(mylink.mydate)
If the column mylink.mydate contains the string "380096.06", then the following function
returns the value 0, because the converted string is not a valid date.
IsValidDate(StringTodate (mylink.mydate))
and reject the row that has invalid date conversions
IsValidDate
Returns whether the given value is valid for the type date.
v Input: testdate (date)
v Output: result (int8)
v Examples. If the column mylink.mydate contains the date 2011-09-13, then the following
function returns the value 1.
IsValidDate(mylink.mydate)
If the column mylink.mydate contains the string "380096.06", then the following function
returns the value 0, because the converted string is not a valid date.
IsValidDate(StringTodate (mylink.mydate))
"Don't let the bull between you and the fence"
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
-
- Participant
- Posts: 59
- Joined: Wed Dec 31, 2008 5:49 am
greggknight wrote:Try using this to make sure your data is correct.
and reject the row that has invalid date conversions
IsValidDate
Returns whether the given value is valid for the type date.
v Input: testdate (date)
v Output: result (int8)
v Examples. If the column mylink.mydate contains the date 2011-09-13, then the following
function returns the value 1.
IsValidDate(mylink.mydate)
If the column mylink.mydate contains the string "380096.06", then the following function
returns the value 0, because the converted string is not a valid date.
IsValidDate(StringTodate (mylink.mydate))
Try First Convert the string to date format like(yyyy-mm-dd) then convert the date to Julian.
Regards
Ravi
Ravi
-
- Participant
- Posts: 59
- Joined: Wed Dec 31, 2008 5:49 am
greggknight wrote:Try using this to make sure your data is correct.
and reject the row that has invalid date conversions
IsValidDate
Returns whether the given value is valid for the type date.
v Input: testdate (date)
v Output: result (int8)
v Examples. If the column mylink.mydate contains the date 2011-09-13, then the following
function returns the value 1.
IsValidDate(mylink.mydate)
If the column mylink.mydate contains the string "380096.06", then the following function
returns the value 0, because the converted string is not a valid date.
IsValidDate(StringTodate (mylink.mydate))
Try First Convert the string to date format like(yyyy-mm-dd) then convert the date to Julian.
Regards
Ravi
Ravi
-
- Participant
- Posts: 59
- Joined: Wed Dec 31, 2008 5:49 am
greggknight wrote:Try using this to make sure your data is correct.
and reject the row that has invalid date conversions
IsValidDate
Returns whether the given value is valid for the type date.
v Input: testdate (date)
v Output: result (int8)
v Examples. If the column mylink.mydate contains the date 2011-09-13, then the following
function returns the value 1.
IsValidDate(mylink.mydate)
If the column mylink.mydate contains the string "380096.06", then the following function
returns the value 0, because the converted string is not a valid date.
IsValidDate(StringTodate (mylink.mydate))
Try First Convert the string to date format like(yyyy-mm-dd) then convert the date to Julian.
Regards
Ravi
Ravi