I'm trying to use the Coldfusion DateFormat Function. Can someone tell me, why doing this:
#DateFormat( now(), "YYYY-MM-DD HH:MM:SS")#
returns this:
2012-07-17 16:07:666
Why the 666 milliseconds? something devilish???
DateFormat does not format time. Use TimeFormat for time.
Edit:
Use this code for date-time output.
#dateFormat(now(),'YYYY-MM-DD')# #timeFormat(now(), 'HH:MM:SS')#
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With