millisecondsToDate(strMilliseconds)
Last updated May 20, 2005
Version: 1 | Requires: CF6 | Library: DateLib
Description:
MillisecondsToDate will convert milliseconds (such as timestamps returned by Java objects) and convert them into CF friendly date timestamps.
Return Values:
Returns a date.
Example:
MillisecondsToDate(1095982571858)<BR>
<cfoutput>#MillisecondsToDate(1095982571858)#</cfoutput>
Parameters:
Name | Description | Required |
---|---|---|
strMilliseconds | The number of milliseconds. | Yes |
Full UDF Source:
<!---
Converts epoch milleseconds to a date timestamp.
@param strMilliseconds The number of milliseconds. (Required)
@return Returns a date.
@author Steve Parks (steve@adeptdeveloper.com)
@version 1, May 20, 2005
--->
<cffunction name="millisecondsToDate" access="public" output="false" returnType="date">
<cfargument name="strMilliseconds" type="string" required="true">
<cfreturn dateAdd("s", strMilliseconds/1000, "january 1 1970 00:00:00")>
</cffunction>
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