Forum Post: Format Of Json Value

  • Thread starter Thread starter OctavioOlguin
  • Start date Start date
Status
Not open for further replies.
O

OctavioOlguin

Guest
Greetings. I have the following code. DEFINE INPUT PARAMETER dateCashOut AS CHARACTER NO-UNDO. DEFINE OUTPUT PARAMETER jsonText AS LONGCHAR NO-UNDO. DEFINE VARIABLE jsonArray AS Progress.Json.ObjectModel.JsonArray NO-UNDO. EMPTY TEMP-TABLE ttdwCorteDeCaja. FOR EACH dwCorteDeCaja WHERE dwCorteDeCaja.Fecha = DATE(dateCashOut). CREATE ttdwCorteDeCaja. BUFFER-COPY dwCorteDeCaja TO ttdwCorteDeCaja. END. FIND FIRST ttdwCorteDeCaja NO-ERROR. IF AVAILABLE(ttdwCorteDeCaja) THEN DO: jsonArray = NEW Progress.Json.ObjectModel.JsonArray(). jsonArray:Read(TEMP-TABLE ttdwCorteDeCaja:HANDLE). jsonText = jsonArray:GetJsonObject(1):GetJsonText(). END. And receive the data in no suitable format. I would like to get date (one of the fields) in "dd/mm/yyyy" or "dd-mm-yyyyy" format, the separators are not the problem, but json gets it formatted as "yyyy-mm-yy" when marshalling temp-table. Is there a way to instruct it to format that way the date data?

Continue reading...
 
Status
Not open for further replies.
Back
Top