CFLib.org – Common Function Library Project

XSDDateFormat(str_date)

Last updated March 18, 2002

author

Rob (r2)

Version: 1 | Requires: CF5 | Library: DateLib

Description:
Takes an Date/Time and makes it into simple XSD date time format (for use in xml xsds). Doesn't do time zones.

Return Values:
Returns a string.

Example:

<CFOUTPUT>
The current date/time in XSD format is: #XSDDateFormat(now())#
</CFOUTPUT>

Parameters:

Name Description Required
str_date Date/time you want converted to XSD format. Yes

Full UDF Source:

/**
 * Takes an Date/Time and makes it into XSD time format (for use in xml xsds)
 * 
 * @param str_date 	 Date/time you want converted to XSD format. 
 * @return Returns a string. 
 * @author Rob (r2) (rob@rtwo.net) 
 * @version 1, March 18, 2002 
 */
function XSDDateFormat(str_date){
   return DateFormat(str_date,"yyyy-mm-ddT") & TimeFormat(str_date,"HH:mm:ss");
}
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson