I am having a batch syntax which prints DateTime. Here it is
echo mydateTime_%date:~-4,4%_%date:~-7,2%d_%date:~-10,2%m_%time:~0,2%hr-%time:~3,2%min-%time:~6,2%sec
I want it to return
mydateTime_2015_22d_04m_9hr-41min-06sec
But it is returning
mydateTime_2015_22d_04m_ 9hr-41min-06sec
A space between 04m_ 9hr
. I dont understand why space is generating ?