Lasso Soft Inc. > Home

[Date_GetMonth]

[Date_GetMonth] returns the month from a date. If no parameter is specified then the current month is returned, otherwise the month is extracted from the specified date.

The result is a number from 1 to 12 where 1 represents January and 12 represents December. An optional -DateShortName keyword instead returns the abbreviated English month name, e.g. "Jan", and an optional -DateLongName keyword returns the full English month name, e.g. "January".

The date parameter should be in standard Lasso date format.

  • Syntax
  • Parameters
[Date_GetMonth: Base Date]

[Date_GetMonth: Base Date, -DateShortName]

[Date_GetMonth: Base Date, -DateLongName]
Required Parameters
Base Date The date from which to extract the month.
Optional Parameters
-DateShortName This keyword returns the abbreviated name of the month.
Examples

To output the current month:

Use the [Date_GetMonth] tag. The following example uses the optional -DateLongName keyword to output the full English month name.

<p>The current month is [Date_GetMonth: (Date_GetCurrentDate), -DateLongName].
Result:
<p>The current month is September.
Tag Link [Date_GetMonth] Category Date
Type Substitution Data Source Any
Support Deprecated Version 3.0
Output Type String or Integer Security None
Implementation LCAPI Sets Lasso 5.0,LDML3x

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft