Need to edge out the competition for your dream job? Train for certifications today.
Mon 09/06/2010 [produced from an "ECHO %DATE%"]
Open in new window
Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.
for /f "tokens=1,2,3 delims=/" %i in ('echo %z%') do echo %i%j%k
REM Get date format settings from registry
for /F "tokens=3" %%A in ('reg query "HKCU\Control Panel\International" /v iDate 2^>NUL') do set "iDate=%%A"
for /F "tokens=3" %%A in ('reg query "HKCU\Control Panel\International" /v sDate 2^>NUL') do set "sDate=%%A"
REM Get the current system date (ignore day name if present)
for %%A in (%Date%) do set "Today=%%A"
REM Parse current date based on delimiter from registry, and assign to desired user variable
for /F "tokens=1-3 delims=%sDate%" %%A in ("%Today%") do (
if "%iDate%"=="0" set /a "d=1%%B-100" & set /a "m=1%%A-100" & set "yyyy=%%C"
if "%iDate%"=="1" set /a "d=1%%A-100" & set /a "m=1%%B-100" & set "yyyy=%%C"
if "%iDate%"=="2" set /a "d=1%%C-100" & set /a "m=1%%B-100" & set "yyyy=%%A"
if %m% LSS 10 set "mm=0%m%"
if %d% LSS 10 set "dd=0%d%"
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.