vincentlowe icon

Three Date Formats (DWL)

vincentlowe | PRO | 02/15/22 06:33:01 PM UTC | 0 ⭐ | 164 👁️ | Never ⏰ | []
text |

480 B

|

None

|

0 👍

/

0 👎

%dw 2.0
output application/json
 var someDates = [
  "Jun 11, 2018",
  "Sep 11, 2017",
  "Jul 11, 2018",
  "Sep 21, 2017",
  "2018-01-20T00:00:00",
  "2018-01-25T00:00:00",
  "2018-01-20T00:00:00",
  "2018/07/11",
  "2018/08/11"
]
 type Scientific = String {format: "yyyy-MM-dd"}
type USDate = String {format: "MMM dd, yyyy"}
type WorldDate = String {format: "dd-MM-yyyy"}
type Chosen = WorldDate
 fun normalizeDate (d: String) = d
 ---
someDates map normalizeDate($)

Comments