Timestamp to Varchar conversion

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
aschindler
Participant
Posts: 30
Joined: Wed May 15, 2013 1:22 am
Location: Bangalore

Timestamp to Varchar conversion

Post by aschindler »

Hi Team,

I have requirement to convert timestamp to varchar.my source field is time stamp and target is varchar field.

input:07/18/2013 17:00:00
output:07182013

i'm getting desired ouput,but warnings are coming with error message:
conversion error calling conversion routine...

i had tried below options
TimestampToDecimal(Column,"%YYYY%MM%DD")
DateToString(TimestampToDate(Column),"%YYYY%MM%DD")

Please let me know how to get rid of warnings.
Cheers,
Schindler
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Can you post your actual (full) unedited error? And your example shows "MMDDYYYY" format, why are you using "YYYYMMDD" in your conversion? If your input is an actual timestamp you should be able to use TimestampToString() directly.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply