Skip to Content

BODS Conversion failed when converting date and/or time from character string

Feb 14 at 04:35 AM


avatar image
Former Member

Hi Experts,

I am facing error while executing BODS Job. I Have SAP BO Data Service 4.2 SP9 is installed. My Workflow contains Abap Dataflow followed by Regular dataflow.

In ABAP dataflow Source is SAP ECC, in This ABAP DF target is .dat file.

A regular Datadlow is connected in that. My final target is SQL Server 2008.

Error is for one field. At ECC source my one field is "Time" data type. I am loading that in SQL server which is also having "Time" data type. But this mapping Throws an error.

but when i am passing null to that field it executes successfully.

Snapshot of error is attached.

Please give me valid input for solving error.


capture.jpg (84.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Feb 14 at 08:44 AM

Hi Dirk,

Thanks for your Reply.

DS data type of that field is "Time".

I have checked to_date function job executes with throwing warning.

Warning = (14.2) 02-14-18 12:11:12 (W) (22404:29332) RUN-053006: |Data flow DF_Reservation_F|Transform Rename Cannot convert string <08:30:22> to date using format string <HH:MI:SS>.

I have used below Expressions for that Field.

1. cast(ABA_ReservationFact.BDZTP,'TIME') 2. to_date(ABA_ReservationFact.BDZTP,'HH:MI:SS') 3. cast(to_date(ABA_ReservationFact.BDZTP,'HH:MI:SS'),'TIME') 4. to_date(ABA_ReservationFact.BDZTP,'HH:MI:SS.ff')

All above given Expressions are not working.

Show 2 Share
10 |10000 characters needed characters left characters exceeded


Check the maximum length of RESB.BDZTP column in SAP ECC table. As per google it is of TIMS(6).

When you are casting the time component to time datatype in Data Services it sees that it has only 6 characters whereas Data Services CAST function requires 8 characters(E.g.12:21:00).

So convert the Time fraction in to String and then convert it to time. I guess it should work fine.

Refer below article


Arun Sasi

Former Member
Arun Sasi

Hi Arun,

Thanks For Your reply.

Yes, as you said, time form in SAP ECC its Time(6). But DS implicitly convert this into 8 characters i.e. (12:21:00).

But the issue was different. Input data from SAP ECC was wrong. For some records it is passing "24:00:00" which is not allowed in DS. So I used "ifthenelse" as solution, replaced "24:00:00" as "00:00:00".

Thanks again,

Swapnil Thorat

Dirk Venken
Feb 14 at 08:18 AM

What's the DS data type of that field? If it's varchar, its content is most probably not in the right format for an implicit conversion to the MS SQL Server time datatype. Us to_date built-in function with the right format parameter.

10 |10000 characters needed characters left characters exceeded