Web Connection
Date fields format in REST responses
Gravatar is a globally recognized avatar based on your email address. Date fields format in REST responses
  Michele
  All
  Mar 21, 2024 @ 10:32pm

In all REST responses all date (date not datetime) fields are passed in JSON as datetime (2024-03-22 became 2024-03-22T00:00:00Z). Is there a way to pass them still as date in their original format ? without time section.

Thanks

Gravatar is a globally recognized avatar based on your email address. re: Date fields format in REST responses
  Rick Strahl
  Michele
  Mar 22, 2024 @ 11:42am

No - there's no date type in JavaScript there's only the equivalent of DateTime.

You can pass dates in some other format and do whatever you want, but you're clients are then responsible for parsing the date and you have to serialize it on your end accordingly (or convert values before serialization).

+++ Rick ---

© 1996-2024