Software >> OS >> Windows >> Command Line >> How to assign a current day of the week to an environment variable

In batch file ============= @for /f "tokens=1-2 delims= " %%a in ('Date /T') do set SomeVar=%%a echo "%SomeVar%" on command prompt ================= @for /f "tokens=1-2 delims= " %a in ('Date /T') do set SomeVar=%a echo "%SomeVar%"