Page 1 of 1

Timestamp to Varchar conversion

Posted: Thu Jul 18, 2013 6:11 am
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.

Posted: Thu Jul 18, 2013 7:16 am
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.