Chapter 2: ColdFusion Functions
LSDateFormat
Formats the date portion of a date/time value using the locale convention. Like
DateFormat LSDateFormat returns a formatted date/time value. If no mask is
specified, LSDateFormat returns a date value using the locale-specific format.
Syntax
LSDateFormat( date [, mask ])
date
Date/time object in the period from 100 AD to 9999 AD.
mask
Set of characters that are used to show how ColdFusion should display the date:
d
dd
ddd
dddd
m
mm
mmm
mmmm
y
yy
yyyy
gg
Usage
When passing date/time value as a string, make sure it is enclosed in quotes.
Otherwise, it is interpreted as a number representation of a date/time object returning
undesired results.
Examples
<!--- This shows LSDateFormat --->
<HTML>
<HEAD>
<TITLE>LSDateFormat Example</TITLE>
</HEAD>
<BODY>
<H3>LSDateFormat Example</H3>
<P>LSDateFormat formats the date portion of a date/time
value using the locale convention.
— Day of the month as digits with no leading zero for single-digit days.
— Day of the month as digits with a leading zero for single-digit days.
— Day of the week as a three-letter abbreviation.
— Day of the week as its full name.
— Month as digits with no leading zero for single-digit months.
— Month as digits with a leading zero for single-digit months.
— Month as a three-letter abbreviation.
— Month as its full name.
— Year as last two digits with no leading zero for years less than 10.
— Year as last two digits with a leading zero for years less than 10.
— Year represented by four digits.
— Period/era string. Currently ignored, but reserved for future use
441
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