Computing.Net > Forums > Disk Operating System > Date Manipulation

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Date Manipulation

Reply to Message Icon

Name: pradeeps
Date: December 5, 2002 at 11:11:29 Pacific
OS: Windows NT
CPU/Ram: PIII, 512MB
Comment:

I would like to write a DOS batch file in which I should be able to extract the day from the date field, for example if the date is Thursday 12/05/2002, then I need just the day value = Thursday. How do I go about doing it? Any help on this will be greatly appreciated.

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: inker
Date: December 5, 2002 at 11:58:21 Pacific
Reply:

Get ftp://ftp.zdnet.com/pcmag/1992/1222/strings.zip

You`ll find you can`t do without this handy little prog


0

Response Number 2
Name: - Uziel -
Date: December 5, 2002 at 14:59:22 Pacific
Reply:

...well I don't know any about how WinNT works, but under Win98[SE]
& if ONLY the day should be displayed, then it is easy. Note: adjust the
script to match'e regionale language sett. of U'r PC! (below=norwegian!)

======================DisplayCurrentDay.bat=========start============
@ Echo OFF
echo.
echo.
ECHO.Exit|%COMSPEC%/K Prompt $_ Today is $D $h$h$h$h$h$h$h$h$h$h$h$hsdag $_|FIND " ">con
echo.
pause>nul
: _eof
cd\
cls
======================DisplayCurrentDay.bat==========end============


0

Response Number 3
Name: Amit
Date: December 11, 2002 at 11:53:21 Pacific
Reply:

Hi Pradeep,

Try following command:

For /F "tokens=1 delims= " %%i IN ('date /t') DO Echo %%i


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Date Manipulation

Making a file name include date www.computing.net/answers/dos/making-a-file-name-include-date/13859.html

How Do I Rename Files By Date www.computing.net/answers/dos/how-do-i-rename-files-by-date/6312.html

User log in date from a batch file www.computing.net/answers/dos/user-log-in-date-from-a-batch-file/7783.html