Convert Time To Number
Posted: Wed Sep 11, 2013 11:20 am
I'm reading in a time value from a CSV file that is formated as HH:mm:ss. I want to strip out the colons and store the results in a numeric (packed decimal) database field. For example if the value in the CSV file is "19:01:20", the value in the database field would be 190120.
On my Read CSV task, I have the time column defined as:
Thanks!
On my Read CSV task, I have the time column defined as:
Code: Select all
In my SQL task, I have the parameter that corresponds to the field where this value should be inserted defiled as:
<column index="7" name="TTIME" type="TIME" pattern="HH:mm:ss" trim="both" />
Code: Select all
When I run the project I get a data type mismatch error. Is there another way to do this?<param index="7" type="NUMERIC" mapFrom="7" nullSubstitute="0" />
Thanks!