Computing.Net > Forums > Windows 95/98 > date comparison in bats for win 98

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 comparison in bats for win 98

Reply to Message Icon

Name: rads
Date: April 16, 2008 at 12:13:56 Pacific
OS: Win 98
CPU/Ram: 256
Comment:

trying to check n compare dates say after 2 months from a reference date disable something , hence trying converting to convert delimited mm-dd-yyyy to numeric mmddyyy so D1 GEQ D2 check can be done

but am unable to proceed to reach mm-dd-yyyy to mmddyyyy .. trying the following
echo.|date>datevar.bat
echo set DATEvar=%%4>current.bat
call datevar
echo ---------now-----%DATEvar%

set D=%DATEvar%
set D1=%D:~10,4%%D:~4,2%%D:~7,2%

thanks in advance



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: April 16, 2008 at 12:34:25 Pacific
Reply:

"set D1=%D:~10,4%%D:~4,2%%D:~7,2%"

I don't think you'll have much luck with substring handling in w98 DOS. Same goes for GEQ.

Regardless, 'date math' is a mess. Look at the many threads in the programming forum.


=====================================
If at first you don't succeed, you're about average.

M2


0
Reply to Message Icon

Related Posts

See More


win98 remote access no fixed disks present



Post Locked

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


Go to Windows 95/98 Forum Home


Sponsored links

Ads by Google


Results for: date comparison in bats for win 98

Using dos games in win 98 www.computing.net/answers/windows-95/using-dos-games-in-win-98/76504.html

Pixel View CL5465 AGP Driver for WIN 98 www.computing.net/answers/windows-95/pixel-view-cl5465-agp-driver-for-win-98/12327.html

re: NTFS for Win 98 www.computing.net/answers/windows-95/re-ntfs-for-win-98/77545.html