Skip to main content
shobhits6437
November 28, 2023
Solved

While getting data from DB using in WebAPI, getting Z appended in the datetime field.

  • November 28, 2023
  • 2 replies
  • 0 views

Hi,

While getting data from DB using in WebAPI, getting Z appended only in the datetime field as below.

WebAPI:

a!localVariables(
local!Details: rule!XXX_DetailsView(
batchSize: http!request.queryParameters.batchSize,
startIndex: http!request.queryParameters.startIndex
),
a!httpResponse(
statusCode: 200,
headers: {
a!httpHeader(name: "Content-Type", value: "application/json")
},
body: a!toJson(value: local!Details)
)
)

It's a simple GET API.

NOTE: rule!XXX_DetailsView - This is queryEntity used to get data from View.

Anyone can advise, what could be the reason, and how can we remove this extra 'Z'.

    Best answer by stefanhelzle0001

    The Z is part of the ISO-8601 standard for date formatting and it means that the date is in the UTC timezone. And you cannot easily remove it.

    2 replies

    stefanhelzle0001
    November 28, 2023

    The Z is part of the ISO-8601 standard for date formatting and it means that the date is in the UTC timezone. And you cannot easily remove it.

    shobhits6437
    November 28, 2023

    Thanks Stefan for your reply.