EndOfMonth Method

Official Content
This documentation is valid for:

Returns the last date of the month of the given date.

Syntax

date-expression | datetime-expression.EndOfMonth()

Type Returned:
Date|DateTime

Description

Returns the last Date of the month in the data type received; that is, when the type received is date it returns a date value and when the type received is datetime it returns a datetime.

Examples

&Var = &Birthday.EndOfMonth()
// where &Birthday: 08/28/2009 
Result: 08/31/09
&DateTo = &DateFrom.EndOfMonth()
&WarningMessage = 'Warning: end of month is ' + DtoC(&DateTo)

Scope

Objects: Procedures, Transactions, Web PanelsWork Panels
Languages: .NET, Ruby (up to GeneXus X Evolution 3), Java, RPG, Visual FoxPro (up to GeneXus X Evolution 3)

See Also

TimeZone Support - General Considerations
EoM function




Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.