Skip to main content
shobhits6437
Known Participant
Nov 28, 2023 3:02 PM UTC
Solved

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

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'.

    stefanhelzle0001
    Brainy
    Nov 28, 2023 3:56 PM UTC

    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
    Brainy
    Nov 28, 2023 3:56 PM UTC

    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
    Known Participant
    Nov 28, 2023 3:59 PM UTC

    Thanks Stefan for your reply.