How to convert XSD datetime into Appian object

I am calling a SOAP service using integration objects; then using xmltojson() plug-in function and a!fromJson() function to retrieve the data in dictionary style.

I am storing this data into a CDT and when doing so, the date fields are NULL even though the web service is returning data. The problem is I need to transform the XSD DATETIME fields into an Appian DATE object. In the figure below you can see the format in which I get the data from SOAP web service. How do I transform an XSD DATETIME into an Appian DATE object?

  Discussion posts and replies are publicly visible

Parents
  • use this in expression rule pass the date via rule input and keep the data type to text

    with(
    local!splitedDateandTime: split(
    ri!jsonDateText,
    "T"
    ) ,

    local!dateInJson: split(
    split(
    local!splitedDateandTime[1],
    "-"
    ),
    "-"
    ),
    local!timeInJson: split(
    split(
    local!splitedDateandTime[1],
    "-"
    ),
    ":"
    ),
    gmt(
    datetime(
    local!dateInJson[1],
    local!dateInJson[2],
    local!dateInJson[3],
    local!timeInJson[1],
    local!timeInJson[2],
    local!timeInJson[3]
    )
    )
    )

Reply
  • use this in expression rule pass the date via rule input and keep the data type to text

    with(
    local!splitedDateandTime: split(
    ri!jsonDateText,
    "T"
    ) ,

    local!dateInJson: split(
    split(
    local!splitedDateandTime[1],
    "-"
    ),
    "-"
    ),
    local!timeInJson: split(
    split(
    local!splitedDateandTime[1],
    "-"
    ),
    ":"
    ),
    gmt(
    datetime(
    local!dateInJson[1],
    local!dateInJson[2],
    local!dateInJson[3],
    local!timeInJson[1],
    local!timeInJson[2],
    local!timeInJson[3]
    )
    )
    )

Children