[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Time/Date/Etc In Xpl



04-26-94 01:00:57 >From: CARL DISTEFANO > To: ROBERT HOLMGREN >Subj: Re: PUTTING THE DATE IN A VARIABLE >PMJI, Robert, ... date-into-variable problem was solved with >Xy4 ≪DOS≫: etc I've been lurking here for several years but until now have kept my peace... Like many other XPLaholics (a big part of my job involves XPL programming), I have also found the absence of a practical way of inserting time/date/etc info into programming save/gets to be totally frustrating ... so I did something about it, although in a slightly Rube Goldbergish manner. Since DOS always knows what the time and date is, I wrote a little program called TIMEDATE.EXE which extracts time/date/etc from DOS, writes it to an XPL file called TIMEDATE.PGM and then gracefully exits. To load the info into programming save/gets enter "DO TIMEDATE " from the XyWrite command line, and then "RUN TIMEDATE.PGM ". The resulting file TIMEDATE.PGM looks something like this: ≪glST≫TIMEDATE.EXE ver 3.0a - by Joel Houplin (c)1991-94 News International Newspapers Ltd 1 Virginia Street, London E1 9BD, ENGLAND Tel: +44 71-782-6958 (vox) +44 71-782-3624 (fax) email jh@xxxxxxxxxxxxxxxxxxx 100020.716@xxxxxxxxxxxxxx Writes time, date, day of week, day of year, etc to TIMEDATE.PGM, an executable XyWrite program that loads values into X registers for further use in programs. Register values stay set as long as XyWrite remains in operation. To use, TIMEDATE.EXE should be in your current directory, or in the environment path and... ≪MDRV≫CM≪MDNM≫do timedate ≪F9≫ ≪MDRV≫CM≪MDNM≫run timedate.pgm ≪F9≫ Which will load the following register values: ≪sv500≫ 2-digit year ≪sv501≫ 2-digit month ≪sv502≫ 2-digit day ≪sv503≫ 2-digit hour ≪sv504≫ 2-digit minute ≪sx505≫ num day of wk (Sun=0) ≪sx506≫ dys since Jan 1 (1/1=0) ≪sv507≫ 3-character MONth ≪sv508≫ Month (full name) ≪sx509≫ hr flag (:00=1, else 0) ≪sv510≫ 4-digit year ≪sv511≫ 2-digit seconds ≪sv512≫ 3-character DAY ≪sv513≫ Day (full name) ≪sv514≫ Secs since midnight ≪sv515≫ Secs since January 1 ≪sv516≫ Tomorrow (YY-MM-DD) ≪sv517≫ Tomorrow (String) ≪sv518≫ Yesterday (YY-MM-DD) ≪sv519≫ Yesterday (String) ≪sv520≫ Atex-style timestamp (;dd/mm,hh:mm) Note:sv=string variable, sx=integer variable ≪lbST≫≪sv500,94≫≪sv501,05≫≪sv502,05≫≪sv503,16≫≪sv504,09≫≪sx505,4≫<