Thank you all.

@Bryan: True. I'm sure it's not specific to spectra, but I knew anyone that
has worked with a date from spectra would recognize what I meant by the
example. Didn't know what else to call it.

@Ray: No access to spectra code. Just the legacy data.

@Kym: Good catch, it does seem to be the percentage of the day.

@Morgan: Thank you! Numberformat with that mask is the winner. Below are
results and test code. I think maybe the milliseconds are what's throwing it
off but it's more than close enough for my needs.

SpectraDate: 40549.556261600
Dateformat: 01/06/2011
TimeFormat: 13:21:01 PM
Numberformat: 40549.5562615741
------------------------------
SpectraDate: 40626.374166700
Dateformat: 03/24/2011
TimeFormat: 08:58:48 AM
Numberformat: 40626.3741666667
------------------------------
SpectraDate: 39972.642604200
Dateformat: 06/08/2009
TimeFormat: 15:25:21 PM
Numberformat: 39972.6426041667

<cfoutput>

<cfset spectraDate = 40549.556261600>
<cfset dateFormattedSD = dateFormat(spectraDate,"MM/DD/YYYY")>
<cfset timeFormattedSD = timeFormat(spectraDate,"HH:MM:SS TT")>
<cfset readableDate = dateFormattedSD & " " & timeFormattedSD>

SpectraDate: #spectraDate# <br>
Dateformat: #dateFormattedSD# <br>
TimeFormat: #timeFormattedSD# <br>
Numberformat: #numberformat(readableDate,".0000000000")#

<hr>

<cfset spectraDate = 40626.374166700>
<cfset dateFormattedSD = dateFormat(spectraDate,"MM/DD/YYYY")>
<cfset timeFormattedSD = timeFormat(spectraDate,"HH:MM:SS TT")>
<cfset readableDate = dateFormattedSD & " " & timeFormattedSD>

SpectraDate: #spectraDate# <br>
Dateformat: #dateFormattedSD# <br>
TimeFormat: #timeFormattedSD# <br>
Numberformat: #numberformat(readableDate,".0000000000")#

<hr>

<cfset spectraDate = 39972.642604200>
<cfset dateFormattedSD = dateFormat(spectraDate,"MM/DD/YYYY")>
<cfset timeFormattedSD = timeFormat(spectraDate,"HH:MM:SS TT")>
<cfset readableDate = dateFormattedSD & " " & timeFormattedSD>

SpectraDate: #spectraDate# <br>
Dateformat: #dateFormattedSD# <br>
TimeFormat: #timeFormattedSD# <br>
Numberformat: #numberformat(readableDate,".0000000000")#

</cfoutput>

Thank you,
Gabriel


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343250
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to