dos - day of week

October 29, 2009 at 07:40:52
Specs: Windows XP
I have need to find the day of the week
es. monday tuesday Wednesday etc…

with commandos dos


See More: dos - day of week

Report •


#1
October 29, 2009 at 08:51:24
Under Windows XP Pro the day of week is part of the output from

  date /T

however if you are running XP home the easiest choice is to use a tiny utility I coded and can send you if you contact me by a private message with your e-mail address.

Report •

#2
October 29, 2009 at 09:46:13
In this command...

Set DOW=%Date:~-14,3%
echo %DOW%

You are copying the characters from the right -14 character. This set the pointer to where you want to start copying. The 3 sets how many characters you want to copy. So the full %Date% looks like....

Wed 10/28/2009

-14,1 = W
-13,1 = e
-12,1 = d
-11,1 =
-10,1 = 1
-9,1 = 0
-8,1 = /
-7,1 = 2
-6,1 = 8
-5,1 = /
-4,1 = 2
-3,1 = 0
-2,1 = 0
-1,1 = 9


Report •

Related Solutions


Ask Question