cancel
Showing results for 
Search instead for 
Did you mean: 

Date,Time conversion in XI

Former Member
0 Kudos
409

Hi,

I am receiving the Date and Time as a string(without relevant separators) in XI3.0 from SAP Idoc source.The Date is like 20050519 and the time is like 142030.

The required format at target structure is as follows:

Date 2005-05-19

Time 14:20:30

I understand that the XI standard Date conversion function

DateTrans will not handle date without separators.Is there any alternative standard function available in

XI 3.0?

If any of the forum members have tried writing simple or advanced function for the above requirement?

If you could share the info,it will be Great.

Thanks in advance,

Leo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Leonard,

It can be done thru XI 3.0 date trans function.Declare the target structure forthis field as date type.In src format enter the format in which u are getting.i.eyyyymmdd.

In des format you can specify the format you want .It should work.

Thanx

Rekha

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Leo -

What SP are you on? I'm on SP11, and I'm able to do what you're talking about with the standard function. Although the dropdown doesn't list a source format without separators, you can simply edit the drop down & remove the separators, making it yyyymmdd, and your conversion will work. It's the same with the time - it doesn't list time formats, but you can type one in (I did HH:mm:ss for your example...) It's using the standard date formatting behind the scenes, so you can list any format that's valid. Let me know if this doesn't make sense.

Former Member
0 Kudos

Thanks Rekha and Amanda.I could solve the issue as suggested by Amanda.I am happy to find a easy way out.

Thanks,

Leo