A udf sounds good... wait.. I think there allready is one :-)
http://cflib.org/udf.cfm?ID=293

A tag based version may also work...
(from
http://cfhub.com/forum//index.cfm?Fuseaction=Thread&TopicID=2879&start=6)

<cfset start_date = createdatetime(1970, 1, 1, 0, 0, 0)>
<cfset epoch_time = 1016535335>
<cfset epoch_converted_date = dateadd("s", epoch_time, start_date)>

<cfoutput>#dateformat(epoch_converted_date)#
#timeformat(epoch_converted_date)#</cfoutput>



> Sounds like the ideal place for a UDF.  All you would need to know is the
> original value (the baseline) and the intervals for these ints (number of
> seconds?). Then use your UDF to calculate the date time. and return it.
>
> Mark
>
> Mark A. Kruger, MCSE, CFG
> www.cfwebtools.com
> ..no more brochures!
>
>
>
> -----Original Message-----
> From: Iocus [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 26, 2002 1:11 AM
> To: CF-Talk
> Subject: date / time question
>
>
> Hi all,
>
> I have inherited a database where dates were stored as integers from PHP
and
> Tcl (epochs -- ex the perl time() function).  Does anyone know how can I
> convert one of these integers (such as "1019347137" and "1012505126") to a
> date format object that ColdFusion can handle?
>
> Any help would be much appreciated.
>
> Thanks!
>
>
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to