year
From a date/time object, gets the year value.
year(date) → returns numeric
Member Function Syntax
date.year()
Argument Reference
date date Required
Compatibility
ColdFusion:
Member function is available in CF11+.
Lucee:
Member function is available in Lucee4.5+.
Examples Sample code invoking the year function
dt = createdatetime(2016,1,1,5,30,25);
y = year( dt );
writeoutput( y ); Expected Result: 2016
© 2012–present Foundeo, Inc. and the CFDocs contributors.
Licensed under the MIT License.
ColdFusion is a trademark of Adobe Systems Incorporated.
https://cfdocs.org/year