Wonderful. And just in time for the weekend.
On Fri, Jan 14, 2011 at 8:33 AM, Jay Birdsell <john_birds...@hotmail.com>wrote: > > > Here's what Google tells me regarding days between "now()" and a > > database > > column value. > > > > select extract(day from (sysdate - dte_2dlcl)) > > > > I have no idea if that's correct and can't test. I think it's a step > > in the > > right direction. > > > > Here's the reference: > > http://stackoverflow. > com/questions/1> > 646001/how-can-i-get-the-number-of-days-between-2-dates-in-oracle-11g > > > Michael, > select extract(day from (sysdate - dte_2dlcl)) if run in sql plus or toad > but not from with <cfquery> > > However, this works: > > ORACLE: > > <cfquery name="final2" datasource="dev11g" > > select corr_id, CAST(dte_2dlcl - #today# as integer) as draft, > CAST( dte_final - #today# as integer) as final > from EXECCORESP000 > > </cfquery> > > The result: draft = 0, final = 3 which is correct as dte_2dlcl= 1/14/11 > and dte_final = 1/17/11 > > CF > > <cfquery name="final" datasource="dev11g" > > select c.* > from EXECCORESP000 c > </cfquery> > <br /> > <cfset today = #Now()#> > <cfset draft =dateDiff('d',#today#,#final.dte_final#)> > > This also provides the correct value. > > Thanks for you input. > > JB > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:340849 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm