Computing.Net > Forums > Windows NT > how to find a date in NT 4

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.

how to find a date in NT 4

Reply to Message Icon

Name: LA Gioia Domenico
Date: April 3, 2001 at 08:15:49 Pacific
Comment:

Hello,
on a system running win2000, typing at dos propt c:\> echo %DATE% the result will be
mar. 03.04.2001.

what is the command on an NT4?
Thanks a lot
Dom



Sponsored Link
Ads by Google

Response Number 1
Name: wong
Date: April 3, 2001 at 08:37:39 Pacific
Reply:

date /t


0

Response Number 2
Name: domenico
Date: April 3, 2001 at 08:50:57 Pacific
Reply:

Wong,
thanks for the answer. in fact I need to copy a file with actual date ex:
copy test.txt test%date%/.txt.
This works on Win2000 and not in NT4
Any Idea?


0

Response Number 3
Name: Dr. Zhivago
Date: April 4, 2001 at 02:59:37 Pacific
Reply:

C:\>Time

Works for me on NT Workstation 4.0


0

Response Number 4
Name: Dr. Zhivago
Date: April 4, 2001 at 03:47:37 Pacific
Reply:

As does Wong's

C:\Date /t

What you're saying is that you want to write some source code that reads the date when the compiled file is executed, right?

And C is your programming language?


0

Response Number 5
Name: domenico
Date: April 4, 2001 at 07:33:45 Pacific
Reply:

In fact evrery day I save a file test.txt to test04.04.2001.txt (04.04.2001 is the date of the day).
With w2000 it works well with this command:
c:\> copy c:\test.txt c:\test%date:~-10%.txt

With NT4 I have found only this workaround
c:\> @echo off
c:\> echo @echo off >date.bat
c:\> echo. |date>>date.bat
c:\> echo @echo off > la.bat
c:\> echo set currdate=%%7 >> la.bat
c:\> call date.bat
c:\> @del date.bat
c:\> @del la.bat
c:\> copy c:\test.txt c:\test%currdate:~0,10%.txt
c:\> set currdate=


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Windows NT Forum Home


Sponsored links

Ads by Google


Results for: how to find a date in NT 4

How to find cpu speed in NT www.computing.net/answers/windows-nt/how-to-find-cpu-speed-in-nt/16430.html

How to Schedule a task in NT ? www.computing.net/answers/windows-nt/how-to-schedule-a-task-in-nt-/14540.html

How to disable a TCP port www.computing.net/answers/windows-nt/how-to-disable-a-tcp-port/22081.html