Close.... But not quite:
#Year(now())# (will give you 2007)
#Year(dateAdd('y',-1,now()))# (will give you 2006)
Or you can do the long way:
#DateFormat(now(), 'yyyy')# (will give you 2007)
#DateFormat(dateAdd('y',-1,now()), 'yyyy')# (will give you 2006)
-----Original Message-----
From: Orlini, Robert [mailto:[EMAIL PROTECTED]
Sent: Monday, January 08, 2007 12:30 PM
To: CF-Talk
Subject: One year behind
How do I date format a year behind the current year? In other words, I
would like to populate a dropdown with 2006 and 2007.
Tried this, but no dice:
"#dateAdd('y',-1,now(), yyyy)#"
Thanks.
Robert O.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:265967
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4