HP3000-L Archives

July 2007, Week 2

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:
Doug Werth <[log in to unmask]>
Reply To:
Doug Werth <[log in to unmask]>
Date:
Wed, 11 Jul 2007 13:29:52 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (59 lines)
Jeff Kell wrote:
> Quick question....
> 
> Would like to do a ":store ... ;date<=[30-days-ago]" in an automated
> fashion.
> 
> I can picture a complicated/convoluted method of HPDAY/HPMONTH/HPYEAR
> manipulation with lots of IFs, but is there a more straightforward
> way?

Jeff,

Try our 'DATEOFF' date offset calculator to set a CI variable that is X
days +/- any given date.

DATEOFF is on our MPE downloads page:

     http://www.beechglen.com/mpe/downloads.html


:dateoff
DATEOFF v1.01  Beechglen Development  [log in to unmask]

Usage: dateoff yyyymmdd,[-]days

Sample script and results:

:print jeffk
option list
deletevar @
dateoff !hpyyyymmdd,-30
setvar stmm,str("!hpdateoffset",5,2)
setvar stdd,str("!hpdateoffset",7,2)
setvar styyyy,str("!hpdateoffset",1,4)
echo store @;*t;!stmm/!stdd/!styyyy;show

:jeffk
deletevar @
dateoff 20070711,-30
DATEOFF v1.01  Beechglen Development  [log in to unmask]

Executing SETVAR HPDATEOFFSET,20070611
setvar stmm,str("20070611",5,2)
setvar stdd,str("20070611",7,2)
setvar styyyy,str("20070611",1,4)
echo store @;*t;06/11/2007;show
store @;*t;06/11/2007;show

HTH.

Doug.
-- 
Doug Werth [log in to unmask]            Beechglen Development Inc.
Director of Technical Support Services             Cincinnati, Ohio
Voice: (513) 922-0509 x26                       Fax: (513) 347-2834

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

ATOM RSS1 RSS2