Date and time without timezone

Hi,

I have a date field in Form. The selected date i need to pass it to integration service which is a datetime field. For my inputted date to pass i need to convert todatetime to pass into integration. The issue we are seeing is below conversion is appending the timezone to the datetimefield which is not needed.

ActualResult:

todatetime(ri!BGDate)

7/20/2023 12:00 AM GMT+00:00(Date and Time with Timezone)

ExpectedResult:

todatetime(ri!BGDate)

7/20/2023 12:00 AM (Date and Time)

Kindly suggest.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Sameer Ul Haq

    There are no data types in JSON. Everything is a string. So, you can just use the text function to format your date in any way you want.

    BTW, looking at the ISO 8601 standard for date formats and the typical way JSON-HTTP APIs are built, IMHO this API should not have an issue with an ISO format.

    a!toJson(
      a!map(
        value: "some",
        date: text(now(), "yyyy-mm-dd") & " 12:00 AM"
      )
    )

Children