Chapter 4: ColdFusion Expressions: Operators and Other Constructs
st
21
century dates
Two-digit years from 00 to 29 are treated as 21
th
20
century dates.
"October 30, 2015"
"October 30, 15"
Note
Thus, arithmetic operations can be used to manipulate date-and-time values. For
example, Now() + 1 will evaluate to tomorrow at the same time. However, we strongly
discourage ColdFusion developers from using this potentially troublesome method of
manipulating date-and-time objects. Date-and-time manipulation routines should be
used instead.
Fast date/time dates in UNIX
On UNIX, there is a switch that provides fast date-time parsing. If you have enabled
this switch, you must refer to dates in expressions in the following order: month, day,
and year. For example:
<CFIF "11/23/1998" GT "11/15/1998">
If this switch is set, the default date format returned by the DateFormat() function
cannot be parsed in an expression. However, if you specify a mask, indicating the
correct order, such as, mm/dd/yyyy, the date returned by this function can be a parsed.
The Fast Date/Time Parsing switch is set on the ColdFusion Administrator Server
Settings page. Refer to Administering ColdFusion Server for more information about
ColdFusion settings.
Note
Notes on using variables
Variable names must begin with a letter that can be followed by any number of letters,
numbers, or the underscore character "_". For example, TheVariable_1 and
TheVariable_2 are valid variable names, while 1stVariable and WhatAVariable! are not.
Sometimes variable names can begin with a qualifier that itself is a variable name. The
qualifier name of a variable is separated from the qualified name with a period
character (.). For example, Form.MyVariable is a valid qualified variable name. The
qualifier, in this case "Form," signifies that we are interested in the form variable
MyVariable, as opposed to, for example, the client variable MyVariable
Internally to ColdFusion, date-and-time values are represented on a time
line as a subset of the real numbers. This is done for efficiency in
evaluation and because it directly mimics the method used by many
popular database systems, including Microsoft Access. One day is equal
to the difference between two successive integers. The time portion of
the date-and-time value is stored in the fractional part of the real
number.
Complex objects, such as arrays, structures, queries, and COM objects
are passed to custom tags surrounded by pound signs (#).
st
century dates; 30 to 99 are treated as
575
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers