Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
June 11, 2003
I have scripted MMM.bat to return the 3 character abbreviation of the current month to a call directed environment variable.
The syntax for using MMM.bat is:
call mmm yourvariable
NOTE: MMM.bat calls univdate.bat.
MMM.bat contains:
@echo off
if {%1}=={} @echo Syntax: call MMM Month&goto :EOF
setlocal
set montab=XXXJANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
call univdate
set /a mm=(100%mm%%%100) * 3
call set month=%%montab:~%mm%^,3%%
endlocal&set %1=%month%
You May Also Like