Standard answer will be:

<cfset myYear = 1999>
<cfset myDay = 182>
<cfset x = dateadd("d", myDay, createdate(myYear - 1, 12, 31))>

Of course, those of us trying to liberate dates and allow them free access
into the numeric arena like the much simpler:
<cfset myYear = 1999>
<cfset myDay = 182>
<cfset x = createdate(myYear - 1, 12, 31) + myDay>

Do realize, though, that I am the only member of the DTLA, date-time
liberation army ... ;)


Dan



-----Original Message-----
From: Christian Abad [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 12:52 PM
To: CF-Talk
Subject: Reverse Engineer DayOfYear Function?


Folks:

I am trying to obtain a date from the ordinal produced by the function
DayOfYear.  In other words, does anyone know how to "reverse engineer" the
ordinal into a usable date?  I would assume I'd need to pass the ordinal and
the year to some function to obtain a usable date.  I can't seem to find a
function that will accomplish this! Any ideas?

Thanks,
Christian N. Abad

--------------------------------------
Sr. Analyst - Apps Programming
Bank of America
eCommerce Technology - Website Support
http://www.bankofamerica.com



______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to