MONTH()

MONTH() operator returns the month portion of its DATE or DATETIME operand.

The returned value is a positive integer between 1 and 12.

MONTH() operator doesn't accept INTERVAL operands.

 

This example program gives you the simplest possible example of how the MONTH() operator can be used:

MAIN

DEFINE my_date DATE

LET my_date = TODAY

DISPLAY "Today is ", my_date

DISPLAY "Day: ", trim(DAY(my_date))

DISPLAY "Month: ", trim(MONTH(my_date))

DISPLAY "Year: ", trim(YEAR(my_date))

END MAIN

In the example programs, month and month_md, MONTH() is used to check whether a month in question comes before or after August.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.