How to get the day of the year in a Date in ColdFusion

DayOfYear() - get the day of the year in a Date

DayOfYear.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DayOfYear function example: how to get the day of the year in a Date</title>
</head>

<body>
<h2 style="color:hotpink">DayOfYear Function Example</h2>

<cfset ToDay=DateFormat(Now())>

<cfoutput>
<b>
Today: #Today#
<br />
ToDay[day of the year]: #DayOfYear(ToDay)#
</b>
</cfoutput>
</body>
</html>





More ColdFusion examples