[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.8

Day Script Not Working Anymore

Asked by simonprr in MS DOS

Tags: dos, day

Hi,

I got the following script from SteveGTR here. I believe since 2006 it hasn't been working out the day name right, like for today it outputs it as Monday. I really need this script to be future proof and work for years to come! Please help!

========================================================
@echo off
cls
setlocal ENABLEDELAYEDEXPANSION

set yyyy=
set $tok=1-3
for /f "tokens=1 delims=.:/-, " %%u in ('date /t') do set $d1=%%u
if "%$d1:~0,1%" GTR "9" set $tok=2-4
for /f "tokens=%$tok% delims=.:/-, " %%u in ('date /t') do (
 for /f "skip=1 tokens=2-4 delims=/-,()." %%x in ('echo.^|date') do (
    set %%x=%%u
    set %%y=%%v
    set %%z=%%w
    set $d1=
    set $tok=))
if "%yyyy%"=="" set yyyy=%yy%
if /I %yyyy% LSS 100 set /A yyyy=2000 + 1%yyyy% - 100
set /A dd=1%dd% - 100
set /A mm=1%mm% - 100
set /A dayNum=%dd% + (2 * %mm%) + (3 * (%mm% + 1) / 5) + %yyyy% + (%yyyy% / 4) - (%yyyy% / 100) + (%yyyy% / 400) + 1
set /A dayNum=%dayNum% %% 7

if /i %dd%==01 goto skipdd
if /i %dd%==02 goto skipdd
if /i %dd%==03 goto skipdd
if /i %dd%==04 goto skipdd
if /i %dd%==05 goto skipdd
if /i %dd%==06 goto skipdd
if /i %dd%==07 goto skipdd
if /i %dd%==08 goto skipdd
if /i %dd%==09 goto skipdd
if /i %dd% LSS 10 set dd=0%dd%
:skipdd
if /i %mm%==01 goto skipmm
if /i %mm%==02 goto skipmm
if /i %mm%==03 goto skipmm
if /i %mm%==04 goto skipmm
if /i %mm%==05 goto skipmm
if /i %mm%==06 goto skipmm
if /i %mm%==07 goto skipmm
if /i %mm%==08 goto skipmm
if /i %mm%==09 goto skipmm
if /i %mm% LSS 10 set mm=0%mm%
:skipmm

set day=%dd%
set month=%mm%
set year=%yyyy%
set yy=%yyyy:~2,2%

if %daynum%==1 set daynamefull=Monday& set dayname=Mon
if %daynum%==2 set daynamefull=Tuesday& set dayname=Tue
if %daynum%==3 set daynamefull=Wednesday& set dayname=Wed
if %daynum%==4 set daynamefull=Thursday& set dayname=Thu
if %daynum%==5 set daynamefull=Friday& set dayname=Fri
if %daynum%==6 set daynamefull=Saturday& set dayname=Sat
if %daynum%==0 set daynamefull=Sunday& set dayname=Sun

if %month%==01 set monthname=January& set shortmonthname=Jan
if %month%==02 set monthname=February& set shortmonthname=Feb
if %month%==03 set monthname=March& set shortmonthname=Mar
if %month%==04 set monthname=April& set shortmonthname=Apr
if %month%==05 set monthname=May& set shortmonthname=May
if %month%==06 set monthname=June& set shortmonthname=Jun
if %month%==07 set monthname=July& set shortmonthname=Jul
if %month%==08 set monthname=August& set shortmonthname=Aug
if %month%==09 set monthname=September& set shortmonthname=Sep
if %month%==10 set monthname=October& set shortmonthname=Oct
if %month%==11 set monthname=November& set shortmonthname=Nov
if %month%==12 set monthname=December& set shortmonthname=Dec

echo %daynamefull% %day% %monthname% %year% %time:~0,8%
pause
========================================================
 
Related Solutions
Keywords: Day Script Not Working Anymore
 
Loading Advertisement...
 
[+][-]02/03/06 12:11 PM, ID: 15867335Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: MS DOS
Tags: dos, day
Sign Up Now!
Solution Provided By: SteveGTR
Participating Experts: 4
Solution Grade: A
 
[+][-]02/02/06 01:48 PM, ID: 15857643Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/02/06 02:07 PM, ID: 15857846Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/02/06 02:11 PM, ID: 15857883Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/02/06 02:28 PM, ID: 15858008Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/02/06 02:31 PM, ID: 15858035Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/02/06 02:34 PM, ID: 15858065Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/02/06 02:39 PM, ID: 15858112Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/02/06 02:47 PM, ID: 15858174Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/02/06 08:32 PM, ID: 15860119Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/03/06 12:05 AM, ID: 15860905Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/03/06 07:53 AM, ID: 15864470Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/03/06 11:03 AM, ID: 15866489Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/03/06 12:00 PM, ID: 15867213Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/03/06 12:02 PM, ID: 15867241Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/03/06 12:13 PM, ID: 15867354Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/03/06 12:15 PM, ID: 15867375Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/03/06 04:45 PM, ID: 15870028Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/04/06 05:33 AM, ID: 15871886Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/04/06 06:49 AM, ID: 15872137Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/04/06 07:21 AM, ID: 15872252Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/04/06 08:01 AM, ID: 15872421Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/04/06 09:07 AM, ID: 15872728Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/04/06 11:17 AM, ID: 15873271Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/05/06 07:17 PM, ID: 15880210Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/06/06 03:50 AM, ID: 15881828Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92