As Charlie and Brian have pointed out, you can use that on the CF side.

You can also do on the SQL side, so since you are presumably getting 
cprAdultExp from a query anyway, it'll save some processing cycles hehe

SELECT cprAdultExp, DATEDIFF(DAY, cprAdultExp, GETDATE()) AS 
NumberOfDaysInBetween FROM tableX


On 1/28/2011 10:55 AM, Charlie Griefer wrote:
> On Fri, Jan 28, 2011 at 11:45 AM, Adam Bourg<adam.bo...@gmail.com>  wrote:
>> I'm trying to figure out how to subtract two dates and return the number of 
>> days between then.
>>
>> My dates are cprAdultExp, which is a database column, I typically write it 
>> as: #dateformat(cprAdultExp,"mm/dd/yyyy")#
>>
>> The other is Now()
>> Which I also format as: #dateformat(Now(),"mm/dd/yyyy")#
>>
>> What's the easy way to do this?
> http://www.cfquickdocs.com/cf9/#datediff
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:341653
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to