Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: /T switch missing in Windows98 Date/Time Command  (Read 12083 times)

0 Members and 1 Guest are viewing this topic.

keldar

  • Guest
/T switch missing in Windows98 Date/Time Command
« on: March 11, 2010, 01:49:22 PM »
Hi all, the /T switch does not appear to be available (or exist) in Windows 98.  I'm writing a batch file that involves displaying the date and time. e.g.,

echo The time is:
time /t

and writes it to a log as welll, e.g.,

time /t >> abc.log

Is there someway I can do this without having to use the /T switch?

Thanks,

Keldar

Computer Hope Admin

  • Administrator


  • Prodigy

    Thanked: 248
    • Yes
    • Yes
    • Yes
    • Computer Hope
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 10
Re: /T switch missing in Windows98 Date/Time Command
« Reply #1 on: March 28, 2010, 04:28:38 AM »
Have you tried the time examples posted on the below link?

http://www.computerhope.com/batch.htm#5
Everybody is a genius. But, if you judge a fish by its ability to climb a tree, it will spend its whole life believing that it is stupid.
-Albert Einstein

Salmon Trout

  • Guest
Re: /T switch missing in Windows98 Date/Time Command
« Reply #2 on: April 03, 2010, 12:37:02 PM »
What's wrong with echo %time% >> abc.log?

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: /T switch missing in Windows98 Date/Time Command
« Reply #3 on: April 03, 2010, 12:38:43 PM »
What's wrong with echo %time% >> abc.log?


windows 98 doesn't have %time%. I actually was only about 80% sure so I just checked... it just says "echo is on"
I was trying to dereference Null Pointers before it was cool.

Salmon Trout

  • Guest
Re: /T switch missing in Windows98 Date/Time Command
« Reply #4 on: April 05, 2010, 06:04:54 AM »
Code: [Select]
@echo off
echo Print time$:SYSTEM>showtime.bas
qbasic /run showtime.bas>timenow.txt
type timenow.txt
type timenow.txt>>time.log

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: /T switch missing in Windows98 Date/Time Command
« Reply #5 on: April 05, 2010, 06:16:03 AM »
Code: [Select]
@echo off
echo Print time$:SYSTEM>showtime.bas
qbasic /run showtime.bas>timenow.txt
type timenow.txt
type timenow.txt>>time.log


They would need Qbasic from the \tools\oldmsdos\ folder of their CD, but that would work.
I was trying to dereference Null Pointers before it was cool.

Salmon Trout

  • Guest
Re: /T switch missing in Windows98 Date/Time Command
« Reply #6 on: April 05, 2010, 06:18:04 AM »
isn't QBasic installed by default? (I have to admit it's around 10 years since I last seriously used that antiquated relic (Windows 98 I mean)



BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: /T switch missing in Windows98 Date/Time Command
« Reply #7 on: April 05, 2010, 06:34:05 AM »
isn't QBasic installed by default? (I have to admit it's around 10 years since I last seriously used that antiquated relic (Windows 98 I mean)




Nope, no version of windows installs it by default. They are on the CD-ROM, though.
I was trying to dereference Null Pointers before it was cool.

ghostdog74



    Specialist

    Thanked: 27
    Re: /T switch missing in Windows98 Date/Time Command
    « Reply #8 on: April 05, 2010, 06:39:40 AM »
    with win98, you can use vbscript using the wsh engine (version 1.0/2.0).