Ok.. I'm doing : #Year(Now())# to get just the current year. It returns 2008.. great.. How do I get it to return just 08? I've tried: #Year(Now(),"yy")# #Year(Now(),"y")# But both fail. Any suggestions for the stupid?
You aren’t stupid. You just overthought it a bit. ;) Like most things in ColdFusion, you have multiple ways to do this. One way is with the simple Right() function:
<cfset thisyear = year(now())>
<cfset oyear = right(thisyear,2)>
You could write that all in one line of course. Another way to do it with dateFormat, and that’s the form I’d use: