How to put the date in the right order?

is there any way to put this date in the right order?

creationDate":"2016-03-17"

so that it stays in that order

creationDate":"17-03-2016"

I guess you can do it by convert it to unixtime and convert it again the way you want it to look like.

Like this

BLOCK:ConstantString
LABEL:DATE
  value = "2016-03-17"
  => CAP @DATE
ENDBLOCK

BLOCK:DateToUnixTime
LABEL:UNIX
  datetime = $"<DATE>"
  format = $"yyyy-MM-dd"
  => VAR @UNIX
ENDBLOCK

BLOCK:UnixTimeToDate
LABEL:BYORDER
  unixTime = @UNIX
  format = "dd-MM-yyyy"
  => VAR @BYORDER
ENDBLOCK
1 Like

it didn’t work because in the request I forgot to mention it. she appears like this

“creationDate”:“2016-03-17T20:03:13Z”

Just use Right Left to parse the specific value you want

There you go

BLOCK:ConstantString
LABEL:DATE
  value = "“creationDate”:“2016-03-17T20:03:13Z”"
  => VAR @DATE
ENDBLOCK

BLOCK:Parse
LABEL:PARSED
  input = @DATE
  leftDelim = "“creationDate”:“"
  rightDelim = "T"
  MODE:LR
  => VAR @PARSED
ENDBLOCK

BLOCK:DateToUnixTime
LABEL:UNIX
  datetime = @PARSED
  format = $"yyyy-MM-dd"
  => VAR @UNIX
ENDBLOCK

BLOCK:UnixTimeToDate
LABEL:BYORDER
  unixTime = @UNIX
  format = "dd-MM-yyyy"
  => VAR @BYORDER
ENDBLOCK