【问题标题】:How to convert twitter created_at to datetime in dataweave 2.0?如何在 dataweave 2.0 中将 twitter created_at 转换为 datetime?
【发布时间】:2021-11-11 10:51:51
【问题描述】:

推特返回的日期

"created_at": "Tue Sep 14 23:57:15 +0000 2021",

期望的输出

"created_at": "2021-09-14 23:57:15",

【问题讨论】:

    标签: twitter dataweave anypoint-studio mulesoft


    【解决方案1】:

    嗨@Imran Qamer 你可以使用这个转换:

    %dw 2.0
    output application/json
    ---
    payload.created_at as DateTime {format: "E MMM dd HH:mm:ss Z yyyy"} as DateTime {format: "yyyy-MM-dd HH:mm:ss"}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-22
      • 1970-01-01
      • 1970-01-01
      • 2021-04-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多