Note that there is a datediff in SQL Server as well. It works the same way, just slightly different dateparts .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com
-----Original Message----- From: Charlie Griefer [mailto:[email protected]] Sent: Friday, January 28, 2011 1:55 PM To: cf-talk Subject: Re: Subtracting two dates On Fri, Jan 28, 2011 at 11:45 AM, Adam Bourg <[email protected]> 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 -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:341672 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

