HP3000-L Archives

August 2003, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Mon, 25 Aug 2003 18:59:14 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (54 lines)
this works for me:
<1 KEM  6:28 PM> echo 20030825 > file
<2 KEM  6:29 PM> input date1 < file
<3 KEM  6:29 PM> setvar date2,dateparse(date1,'YMD')
<4 KEM  6:30 PM> echo 08/25/03 > file
<5 KEM  6:31 PM> input date3 < file
<6 KEM  6:31 PM> setvar date4,dateparse(date3,'MDY')
<7 KEM  6:32 PM> showvar date#
DATE2 = 03/08/25
DATE1 = 20030825
DATE3 = 08/25/03
DATE4 = 03/08/25
<8 KEM  6:32 PM>

however, it seems variables can not be of 'type DATE', only expressions
can. so you'd have to use something like:
<26 KEM  6:45 PM> if dateparse(date2,'YMD') + 7 > today()
*** EXPRESSION TRUE
<27 KEM  6:46 PM> endif

to see if date2 is less than a week old

hth
/per (first post using new mailer, hope this i readable...)
---------------------------------------------------
Per Ostberg  / per.2.ostberg@hs..se
phone +46-8-58581213 / mob +46-70-4840253
fax +46-8-58587710
Huddinge University Hospital
LabMedicin-IT / C1 51 / S-141 86  HUDDINGE / SWEDEN
---------------------------------------------------
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On Behalf
Of
John Bawden
Sent: Monday, August 25, 2003 7:42 AM
To: [log in to unmask]
Subject: [HP3000-L] MPEX date routine needed

Fellow listers,

I have a date in a single record ASCII flat file that
I would like to input into MPEX as a date data type so
that I could compute other dates bfore and after the
input date. Does anyone have a routine to get this
into MPEX and convert it to the DATE type?
TIA

John Bawden
QualChoice

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2