China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 14:52
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] The running result of the date command in 2K environment View 1,541 Replies 5
Original Poster Posted 2006-04-11 22:01 ·  中国 四川 成都 鹏博士宽带
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
Who has a machine with a 2K system installed? Please help run date and post the running result. Thanks a lot.
Floor 2 Posted 2006-04-11 22:06 ·  中国 广东 广州 白云区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
I have Win 2000 Pro SP4. The result is:

Tuesday 2006-04-11
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 3 Posted 2006-04-11 22:14 ·  中国 四川 成都 鹏博士宽带
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
Originally posted by JonePeng at 2006-4-11 22:06:
I have Win 2000 Pro SP4. The result is:

Tuesday 2006-04-11

This is a DOS batch program I wrote under XP
I want to extract the system time in the 060101 format
I don't know how to write it in 2K to achieve this effect
Can you help modify it? Thank you
@echo off
set short_time=%date:~2,2%%date:~5,2%%date:~8,2%
echo %short_time%
pause

[ Last edited by namejm on 2006-4-11 at 22:45 ]
Floor 4 Posted 2006-11-25 06:59
中级用户
★★
DOS之日
Credits 337
Posts 161
Joined 2006-11-04 05:27
19-year member
UID 69523
Gender Male
Status Offline
@echo off
set short_time=%date:~-8,2%%date:~-5,2%%date:~-2,2%
echo %short_time%
pause
for /f %%h in (`echo hxuan`) do for /f %%x in (`echo hxuan`) do if %%h==%%x nul
Floor 5 Posted 2006-11-25 22:46 ·  中国 北京 朝阳区 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
The file time obtained by the batch processing %~t0 parameter in Win2000 is: 06-11-19 19:35 (2-digit year representation)
The file time obtained by the batch processing %~t0 parameter in Win2003 is: 2006-11-19 19:37 (4-digit year representation)
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 6 Posted 2006-11-25 23:19 ·  中国 江苏 南京 电信
高级用户
★★
Credits 623
Posts 214
Joined 2006-09-22 20:48
19-year member
UID 63387
Status Offline
My is Windows 2003
2006-11-25 Saturday
Forum Jump: