Focal Point
Month Function

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7741088331

July 28, 2005, 09:37 PM
SLU Will
Month Function
Reading through the help contents on WF 5.3.3, I came across this:

----------
Example: Extracting the Month From a Date
MONTH extracts the month from each value in the DATE field:

MONTH(DATE)The following are sample values for DATE and the corresponding values for MONTH(DATE):

DATE MONTH(DATE)
---- -----------
01/01/2000 1
02/01/2000 2
03/01/2000 3

------------

My goal is to extract only the month from a field, but is this the way to go about it? And, if it is, how is it used in a define statement?

My define statement:

CUR_MONTH/YYMD = 20050630;

Now, I only want 06 to come out of that line of code. What's the best way to get that 06 out of that line of code?

Thanks for any help you can give me.

Will
July 28, 2005, 11:33 PM
andrew w
Will,

Try this:

CURMTH/M = CUR_MONTH

Or you could just display CUR_MONTH in M format in your report procedure.

Cheers

Andrew W
August 03, 2005, 04:33 PM
SLU Will
That worked perfectly. Thanks for your help. I wasn't sure you could just do an M like that, but obviously you can.

Thanks again!