Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[win batch] var truncation

Custom Title Activated
Loyal Member
Joined
Nov 28, 2004
Messages
2,236
Reaction score
0
Hi there.
I worked with simple batch files really long time ago so maybe someone could say one thing, cuz I don't remember.

I need to get first four numbers of %date% env. variable.

I think the code is:
@echo off
echo %date~0.4%
but when I type it I get echo is off.

BTW, I will use this with winxp (truncation didn't work with 9x)

Thanks for quick help.
 
Custom Title Activated
Loyal Member
Joined
Nov 28, 2004
Messages
2,236
Reaction score
0
Thanks for no help. I managed to recall the correct scheme.
%date:~0,4%
 
Back
Top