Returns a date/time object from a string. ParseDateTime
converts date/time strings that are in the U.S. date format. Use LSParseDateTime for international date parsing.
ParseDateTime(date/time-string [, pop-conversion ] )
ParseDateTime
is similar to CreateDateTime
except that it takes a string instead of specifically enumerated date/time values.
ParseDateTime
and CreateDateTime
are provided primarily to increase the readability of code in compound expressions.
Year values 0 - 29 are interpreted as 21st century dates. Year values 30 - 99 are interpreted as 20th century dates.
When passing a date/time value as a string, enclose it in quotes. Otherwise, it is interpreted as a number representation of a date/time object.
Note If the date is formatted for a locale other than the English (US) locale, you must use the |
<!--- This example shows the use of ParseDateTime---> <html> <head> <title> ParseDateTime Example </title> </head> <body bgcolor = silver> <H3>ParseDateTime Example</H3> <cfif IsDefined("FORM.theTestValue")> <cfif IsDate(FORM.theTestValue)> <H3>The expression <cfoutput>#DE(FORM.theTestValue)#</cfoutput> is a valid date</H3> <P>The date, parsed for use as a date/time value: <cfoutput>#ParseDateTime(FORM.theTestValue)#</cfoutput> ...