umochock@ccu.umanitoba.ca (Russell Ochocki) (05/29/90)
REXX has a whole host of functions for printing the date out in every format ever conceived, but they only work with today's date. Real useful. Has anyone found a way to get these routines to work with a date other than today's? -- | | \/ Russell Ochocki, University of Manitoba | _/\_ Winnipeg, Manitoba, Canada (umochock@ccu.umanitoba.ca) |
akcs.psop@wcbcs (Paul Sop) (06/08/90)
> Has anyone found a way to get these routines to work with a date > other than today's? he he he... How about (he he): address command 'date' whatever_format_date_likes /* Do Date Stuff */ address command 'setclock opt load' If you made the date and setclock commands resident, it would work. Admitidly, a real crappy way to do it, but it would work. (If you don't follow what's happening, we run the dos command to set the date to something else, then date() functions will work on the new date. When we are finished, we reset the clock by loading from battery backed up clock ram) If you don't have a battery backed up clock, you could get the real time and date with the arexx functions, and use those as arguments to the date function a second time (instead of setclock).
dlwhite@digi.lonestar.org (Danny White) (06/12/90)
In article <[266f2876:8.1]comp.lang.rexx;1@wcbcs> akcs.psop@wcbcs (Paul Sop) writes: >How about (he he): > [method deleted] > >Admitidly, a real crappy way to do it, but it would work. > GAD! What a terrible thing to do to a simple question!;^) Actually, If you were to do this, don't overlook the fact that you are running on a mult-tasking system and that there may be other programs that could access the date/time while you have it changed. (NOTE: I didn't say that the method wouldn't work! BUT...;^)) (ALSO NOTE: I don't know any other way to do it! I just wanted to point out somthing some people reading this might not think of until it bit them) ymos, ...!texbell!digi!whitwiz!danny dlwhite@digi.lonestar.org ...!digi!dlwhite danny@whitwiz.UUCP ========================================================================== "In order to make an apple pie from scratch, you must first create the universe." -- Carl Sagan, Cosmos ==========================================================================