Batch script: Extracting date

August 17, 2009 at 12:47:01
Specs: Windows XP
I have this script to take out the spaces from a date in a batch script:
set dt = %date%: =%

But when I echo %dt% I only get:
=: =

Any thoughts?


See More: Batch script: Extracting date

Report •


#1
August 17, 2009 at 13:14:07
set dt=%date: =%
echo.%dt%


Report •

#2
August 17, 2009 at 13:27:28
The first line works fine in extracting the non-space date, but it doesn't set it to dt correctly.
That's fine, though. I'll embed %date: =% into where I need the date, that seems to work.

Thanks.


Report •

Related Solutions


Ask Question