Date/Time Conversion ColdFusion

前端 未结 5 614
名媛妹妹
名媛妹妹 2021-01-19 13:17

I\'m working with a script that displays the date and time in ISO 8601 format like so: 2012-05-17T17:35:44.000Z.

but I would like it to display in the n

5条回答
  •  离开以前
    2021-01-19 13:40

    Pretty sure just a parse and then output will give it to you in the format you want :

    #parseDateTime(REReplace("2012-05-17T17:35:44.000Z", "(\d{4})-?(\d{2})-?(\d{2})T([\d:]+).*", "\1-\2-\3 \4"))#
    

    Edit: Fixed and tested. ;)

提交回复
热议问题