How to get quarter number from a date object in ColdFusion

Quarter() - get quarter number from a date object

Quarter.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Quarter function example: how to get quarter number from a date object</title>
</head>

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

<cfset MyDate=DateFormat(Now())>

<cfoutput>
<b>
MyDate: #MyDate#
<br />
Quarter Number[MyDate]: #Quarter(MyDate)#
</b>
</cfoutput>
</body>
</html>






More ColdFusion examples