Parsedatetime - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

ParseDateTime

Description
Parses a date/time string according to the English (U.S.) locale conventions. (To format a date/
time string for other locales, use the
Returns
A date/time object
Category
Date and time
functions,
Function syntax
ParseDateTime(date/time-string [, pop-conversion ] )
See also
IsDate, IsNumericDate,
Parameters
Parameter
date/time string
pop-conversion
Usage
This function is similar to
values. These functions are provided primarily to increase the readability of code in compound
expressions.
To calculate a difference between time zones, use the
To set the default display format of date, time, number, and currency values, use the
function.
Note: This function does not accept POP dates.
Example
<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 parsed date/time is:
<cfoutput>#ParseDateTime(form.theTestValue)#</cfoutput>
<cfelse>
<h3>The expression <cfoutput>#DE(form.theTestValue)#</cfoutput> is not a
valid date</h3>
</cfif>
</cfif>
636
Chapter 3: ColdFusion Functions
LSParseDateTime
Display and formatting functions
SetLocale
Description
A string containing a date/time value formatted according to U.S. locale
conventions. Can represent a date/time in the range 100 AD–9999 AD. Years
0-29 are interpreted as 2000-2029; years 30-99 are interpreted as 1990-
1999.
• pop: Specifies that the date/time string is in POP format, which includes the
local time of the sender and a time-zone offset from UTC. ColdFusion applies
the offset and returns a value with the UTC time.
• standard: (the default) function does no conversion.
CreateDateTime
function.)
, but it takes a string instead of enumerated date/time
GetTimeZoneInfo
function.
SetLocale

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents