Hi all
I have a requirement to build a WEB API and a Process model to update other external system. The request to the web api is:
{ "accountNumber": "20171941", "houseNumber": "13329892", "contractStartDate": "2022-08-25T00:00:00.0000000+01:00", "contractEndDate": "2023-08-25T00:00:00.0000000+01:00"}
From the WEB API I am using the function a!fromJson to get the values for the process model from the http!request.body, as usual. When we validate the process model and it execution the dates on the request changed from 2022-08-25T00:00:00.0000000+01:00 to 8/24/2022 11:00 PM GMT+00:00.
I understand that the JSON functions detects the Date but we really need to keep that format from the request. Any Idea?
Thanks
Mario
Discussion posts and replies are publicly visible
Can you explain more about the dates having "changed"? As a reminder, Appian carries all date values as their underlying GMT value, and typically upon rendering shows you the relative value according to your local timezone (but the underlying value is still the same). I'm unclear what may be happening in your case as it sort of depends on details you haven't provided yet.
When the value is passed from the WEB API to the process Model, I notice that the Strings for the date values change from 2022-08-25T00:00:00.0000000+01:00 to 8/24/2022. I understand that APPIAN understands that the string is a date based on the format but I need to keep the format, this is I need to treat it as string.
mrios0001 said:I notice that the Strings for the date values change from 2022-08-25T00:00:00.0000000+01:00 to 8/24/2022.
Can you clarify what you're seeing to make you think this? Where are you seeing "8/24/2022"? What data type is the PV it's being stored in - is it actually string?