ColdFusion - Date and Time formatting is rounding up 5 minutes
问题 I have the following date string: 2017-05-02 08:00:00.0 When I apply datetimeformat() like: #datetimeformat(item.getValue('releasedate'), 'h:mm a')# It is rounding up by 5 minutes and outputting: 8:05 AM. In the code above, 'releasedate' is the string that is being passed in. How do I fix this? 回答1: Nobody is rounding anything. You are outputting the month here instead of the minutes, and the month happens to be May, so that is 05 with leading zero. https://cfdocs.org/datetimeformat: mm :