1.

Solve : Get month in cmd?

Answer»

Hey everyone

You know if you TYPE 'echo %date%' in the COMMAND prompt, it shows the date like:
Fri 02/23/2007

Is there any way for it to show the current month like from a batch file or something
Any help would be greatly appreciated Have no idea what OS you have, but this will work on some versions of Windows.

Code: [Select]set mm=%date:~4,2%
echo %mm%

8-)Hey thanks Sidewinder, I can use that.
Using xp btwQuote

Hey everyone


Is there any way for it to show the current month like from a batch file or something
Any help would be greatly appreciated


There is a free utility program that does a LOT of date and MATH functions.

Fdate
http://www.ferg.org/fdate/index.html

As far as I know, it works not only with MS-DOS, but with all versions of Windows command line.

It is well documented, but be prepared to SPEND a few minutes reading. It has a multitude of functions, so to get the one you want, and the format you want, you have to wade through all the other STUFF.
As with most anything, once you get the hang of it though, it is very easy to use.

I hope this helps.




Discussion

No Comment Found