Re: System date & time

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Tue, 9 Feb 1999, Arlie Codina wrote:

] I'm new to Euphoria (1 week) can anyone help me?

Welcome to our world! :)

] How do I change programatically system date and time?

As far as I know, you can't change the date or time with Euphoria. You can
read it with the date() function, but it's not rewritable back to DOS or
Windows [I'll drop a feature _hint_ here for Rob C. :)].

A DOS system call may be what you're after.
Try:

    system("echo.|time hh:mm:ss",2) -- the 'echo.|' is important!

and:

    system("echo.|date mm/dd/yyyy",2)

    or depending on how your computer is set up:

    system("echo.|date dd/mm/yyyy",2)

The 'echo.|' sections _are_ important. Without them the computer will wait
for you to press a key. Not good in a running program.

HTH,
Carl

--
Carl R White -- Final Year Computer Science at the University of Bradford
E-mail........: cyrek- at -bigfoot.com -- Remove hyphens. Ta :)
URL...........: http://www.bigfoot.com/~cyrek/
Uncrackable...: "19.6A.23.38.52.73.45 25.31.1C 3C.53.44.39.58"

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu