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");
}

Search CFLib.org


Latest Additions

Raymond Camden added
QueryDeleteRows
November 04, 2017

Leigh added
nullPad
May 11, 2016

Raymond Camden added
stripHTML
May 10, 2016

Kevin Cotton added
date2ExcelDate
May 05, 2016

Raymond Camden added
CapFirst
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson