Name
CreateDate
Synopsis
CreateDate(year, month, day
)
Returns a date/time object for the given date. The time value is set
to 00:00:00
. For the
year
parameter of the function, ColdFusion
MX accepts years in the range AD 100-9999. ColdFusion MX uses the
underlying JRE as well as the current locale to determine how to
process two-digit years. For most locales, two-digit years are
processed relative to the current century. Based on this, two-digit
years are interpreted to within 80 years before the current date and
20 years after. There are a few exceptions to this. The following
locales interpret two-digit years to within 72 years before the
current date and 28 years after: English (Australian), English (New
Zealand), German (Austrian), German (Standard), German (Swiss),
Portuguese (Brazilian), Portuguese (Standard), Swedish. Example:
April 15, 2003 looks like: <cfoutput> Four digit year: #CreateDate(2003, 04, 15)#<br> Two digit year#CreateDate(03, 04, 15)# </cfoutput>
Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.