Skip to Content
author's profile photo Former Member
Former Member

Conversion of specific time format to Datetime variable

Hello,

I am using SAP MII 15.1

I am receiving timestamp in following format in XML form as below -

20171206T070000.000

I would like to convert it into standard Datetime datatype like below-

2017-12-06T07:00:00.000

I am trying to find if standard expression editor functions in link editor can help, but could not find so far.

Kindly advise.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 01, 2018 at 04:24 PM

    You should be able to do it with the dateformat() function:

    dateformat("20171206T070000.000", "yyyyMMdd'T'HHmmss.SSS", "yyyy-MM-dd'T'HH:mm:ss.SSS")

    Here is a link to the data and time formats in the MII help:

    https://help.sap.com/viewer/d70c3ac3566b41dd896cd7cecc94e14a/15.1.6/en-US/4cc6a33de8d47181e10000000a15822d.html

    Regards

    Christian

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.