MonthAsString

Description

Returns the name of the month corresponding to month_number.

Category

Date and time functions

Syntax


MonthAsString(month_number) 

See also

DatePart, Month, Quarter

Parameters

Parameter
Description
month_number
An integer ranging from 1 to 12.

Example

<!--- shows the value of the MonthAsString function --->

<html>

<head>

<title>

MonthAsString Example

</title>

</head>



<body bgcolor = silver>

<H3>MonthAsString Example</H3>



<cfif IsDefined("FORM.year")>

More information about your date:

<cfset yourDate = CreateDate(FORM.year, FORM.month, FORM.day)>



<cfoutput>

<P>Your date, #DateFormat(yourDate)#.

<BR>It is #DayofWeekAsString(DayOfWeek(yourDate))#, day

 #DayOfWeek(yourDate)# in the week.

<BR>This is day #Day(YourDate)# in the month of

 #MonthAsString(Month(yourDate))#, which has

  #DaysInMonth(yourDate)# days.

<BR>We are in week #Week(yourDate)# of #Year(yourDate)# (day

 #DayofYear(yourDate)# of #DaysinYear(yourDate)#). 

<BR><cfif IsLeapYear(Year(yourDate))>This is a leap

 year<cfelse>This is not a leap year</cfif>

</cfoutput>

</cfif>

...







Banner.Novgorod.Ru