ColdFusion DateFormat CheatSheet

DateFormat Masks

Mask Example Value Description
d 1 Day of the month as a number
dd 01 Two digit day of the month
ddd Mon Three character day of the week.
dddd Monday The full day of the week
m 6 The month as a number.
mm 06 The month as a two digit number.
mmm Jun The month as a three character string.
mmmm June The full month name.
y 7 Year as a single digit if less than 10
yy 07 Last two digits of the year
yyyy 2007 The year
short 6/1/07 Same as m/d/yy
medium Jun 1, 2007 Same as mmm d, yyyy
long June 1, 2007 Same as mmmm d, yyyy
full Friday, June 1, 2007 Shortcut for dddd, mmmm d, yyyy

DateFormat Example

  #DateFormat(Now(), "mm/dd/yyyy")# 

The above example outputs the current date formatted with the DateFormat function. Use any of the formatting masks located on the left for your reference.

Questions, comments, criticism, or requests can be directed Here

Copyright © 2007 Peter Freitag (, All Rights Reserved. This document may be printed freely as long as this notice stays intact.