@MONTH[date[,format]] : Returns the month number for the specified date (1-12). See date formats for information on acceptable date formats.

 

@MONTH accepts an optional second parameter specifying the date format:

 

0default
1USA (mm/dd/yy)
2Europe (dd/mm/yy)
3Japan (yy/mm/dd)
4ISO (yyyy-mm-dd)
5ISO 8601 yyyy-Www-d
6ISO 8601 yyyy-ddd

 

Examples:

 

echo %@month[2010-01-01]

1

 

echo %@month[%_date]

5