DateDiff("yyyy", Date1, Date2)

Where Date1 and Date2 are valid CF Date/Time objects.

the datepart "yyyy" is in years.
the datepart "y" is days of the year (1-365?) same as "d" for days.

Cheers,
Chris


Nick G wrote:
> What is the syntax of finding the difference in years between two date 
> fields? 
> For example I'm selecting a field from a database and trying to find the 
> difference between that and todays date?
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265236
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to