You can use JSON function WriteJSONDate(<Date>, <Format>, <DateWritingVariant>)
Parameters:
<Date> (required)
Type: Date.
Date to be transformed into JSON format.
<Format> (required)
Type: JSONDateFormat.
Recorded date format.
<DateWritingVariant> (optional)
Type: JSONDateWritingVariant.
Available options for writing JSON dates.
Default value: LocalDate.
Returned value:
Type: String.