Determines the ordinal (day number, in the year) of the first day of the month in which a given date falls.
A number that corresponds to a day-number in a year.
FirstDayOfMonth(date) |
Day, DayOfWeek, DayOfWeekAsString, DayOfYear, DaysInMonth, DaysInYear
Parameter |
Description |
|---|---|
date |
Date/time object, in the range 100 AD–9999 AD. |
When passing a date/time value as a string, enclose it in quotation marks. Otherwise, it is interpreted as a number representation of a date/time object.
<cfscript>
Date1 = "{ts '2018-12-06 12:13:50'}";
FirstDayOfMonth= FirstDayOfMonth(Date1)
year = (Date1)
writeOutput("The first day of month in " & year & "<br/>")
writeOutput("falls on day number " & FirstDayOfMonth)
</cfscript>
Output
The first day of month in {ts '2018-12-06 12:13:50'}
falls on day number 335
Sign in to your account