Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Expression error: Invalid date format of parameters in: datetoxmlformat

Hi All,

I am using SAP MII 12.

I have a strange problem. I am extracting Data from SAP (RFC) and trying to write to SQL Server.

Since SAP Returns Date and Time Seperately i am using the datetoxmlformat function. The usage of this i found in one of the sample SAP MII BLS transactions. Below is the usage

Function:

datetoxmlformat(Repeater_ForEveryActivityInGroup.Output{/item/CREATED_DT}& " " & Repeater_ForEveryActivityInGroup.Output{/item/CREATED_TM}, "yyyy-MM-dd HH:mm:ss")

When I evaluate this (in the Designer or when execute the BLS) i get the error :

[ERROR]: STEP EXCEPTION (Sequence_2) : Expression Evaluation error: Invalid date format of parameters in: datetoxmlformat.

But when i replace

Repeater_ForEveryActivityInGroup.Output{/item/CREATED_DT}& " " & Repeater_ForEveryActivityInGroup.Output{/item/CREATED_TM}

with a static date like "2008-09-09 06:01:01" in the expression editor as below

datetoxmlformat( "2008-09-09 06:01:01", "yyyy-MM-dd HH:mm:ss" )

MII returns : 2008-09-09T06:01:01 (which is the result expected).

Can you please help me find out what is the issue and why i keep getting the error ?:

Invalid date format of parameters in: datetoxmlformat

Help is greatly appriciated.

Regards

Suraj

Edited by: Suraj Prabhu on Jul 1, 2011 11:59 PM

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question