| CFML Reference
|
|
ColdFusion Functions
|
FirstDayOfMonth
Description
Returns the ordinal (the day's number in the year) for the first day of a month.
Category
Date and time functions
Syntax
FirstDayOfMonth(date)
See also
Day, DayOfWeek, DayOfWeekAsString, DayOfYear, DaysInMonth, DaysInYear
Parameters
| Parameter |
Description |
date
|
A date
|
Usage
Year values 0 - 29 are interpreted as 21st century dates. Year values 30 - 99 are interpreted as 20th century dates.
When passing a date/time value as a string, enclose it in quotes. Otherwise, it is interpreted as a number representation of a date/time object.
Example <!--- This example shows the use of FirstDayOfMonth --->
<html>
<head>
<title>FirstDayOfMonth Example</title>
</head>
<body bgcolor = silver>
<H3>FirstDayOfMonth Example</H3>
<cfoutput>
The first day of #MonthAsString(Month(Now()))#,
#Year(Now())# was
a #DayOfWeekAsString(DayOfWeek(FirstDayOfMonth(Now())))#,
day #FirstDayOfMonth(Now())# of the year.
</cfoutput>
</body>
</html>
|
Copyright © 2001, Macromedia Inc. All rights reserved. |
|
|