HP3000-L Archives

January 2007, Week 1

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:
John Eidemiller <[log in to unmask]>
Reply To:
John Eidemiller <[log in to unmask]>
Date:
Thu, 4 Jan 2007 15:53:54 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (59 lines)
I believe they answer lies in the MpeX  "Set Date" command. The MpeX default 
for Set Date is MDY, but Datebuild is setting your variables to a YMD format. 
Then to compound the confustion MpeX is still assuming your variables are in 
MDY format. That is why you see: Expected date in MM/DD/YY format, not 
70/01/01

So, showvar d@ shows:
D1 = 70/01/01
D2 = 06/12/28

MpeX believes D1 represents the 70th month, 1st day, of year 01
and D2 represents the 6th month, 12th day, of year 28.

Try doing this in MpeX:

SET DATE,YMD
SETVAR D1 DATEBUILD(70,01,01)
SETVAR D2 DATEBUILD(06,12,28)
CALC !D2-!D1


and voila:
13510, $34C6, %32306, "..4."

Hope this helps.

John E.


On Thu, 28 Dec 2006 12:14:28 -0800, Larry Barnes 
<[log in to unmask]> wrote:

>I'm trying to take a date that is entered as a string value then convert
>it to a date and subtract that date from another date that was created
>using datebuild.  When I attempt to subtract one from the other I keep
>getting an error.  I've searched the archives and can't find anything on
>this.
>Can someone set me straight.
>
>Here's what I've tried (inside of MPEX):
>
>	%SETVAR D1 DATEBUILD(70,01,01)
>	%SETVAR D2 DATEBUILD(06,12,28)
>	%CALC !D2-!D1
>
>	Processing 06/12/28-70/01/01
>	                    ^
>	Error: Expected date in MM/DD/YY format, not 70/01/01
>
>Thanks for your input.
>
>Larry B.
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

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

ATOM RSS1 RSS2