User Guide

LSParseDateTime 615
LSParseDateTime
Description
Converts a string that is a valid date/time representation in the current locale into a date/time
object.
Returns
A date/time object.
Category
Date and time functions, Display and formatting functions, International functions, String
functions
Function syntax
LSParseDateTime(date/time-string)
See also
LSDateFormat, ParseDateTime, SetLocale, GetLocale
History
ColdFusion MX:
Changed formatting behavior: this function might not parse string formats that worked with
earlier releases. This function uses Java standard locale formatting rules on all platforms.
Changed how the date/time-string parameter value is processed: ColdFusion processes the
date/time-string parameter value time zone information differently than in earlier releases,
as described in the Usage section.
Parameters
Usage
This function can parse any date, time, or date/time combination that conforms to Java standard
locale formatting rules for the current locale.
The following table lists some of the date/time values you can pass to this function in the English
(US) locale. You can also pass only the date or the time parts of these formats:
Parameter Description
date/time-string A string a variable that contains one, in a format that is readable in the current
locale.
Format Example
m/dd/yy h:mm:ss 1/30/02 7:02:33
m/dd/yy h:mm tt 1/30/02 7:02 AM
m/dd/yyyy h:mm 1/30/2002 7:02 AM
mmm dd, yyyy h:mm:ss tt Jan 30, 2002 7:02:12 AM
mmmm dd, yyyy h:mm:ss tt zzz January 30, 2002 7:02:23 AM PST
ddd, mmm dd, yyyy hh:mm:ss Wed, Jan 30, 2002 07:02:12
dddd, mmmm dd, yyyy h:mm:ss tt zzz Wednesday, January 30, 2002 7:02:12 AM PST