millisecondsToDate(strMilliseconds)
Last updated May 20, 2005
Version: 1 | Requires: ColdFusion MX | 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:
<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
Shawn Porter added
DeMoronize
3 hour(s) ago
Chris Carey added
readPropertiesFi...
1 day(s) ago
Randy Johnson added
lastDayofWeek
3 day(s) ago
Frank Marion added
sitemapPing
7 day(s) ago
Top Rated
QuickSort
Rated 5.0, 3 time(s)
indentXml
Rated 5.0, 3 time(s)
queryColumnsToSt...
Rated 5.0, 3 time(s)
generateSsccAsn
Rated 5.0, 3 time(s)