HP3000-L Archives

May 1998, 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:
"Michael P. Smith" <[log in to unmask]>
Reply To:
Michael P. Smith
Date:
Mon, 4 May 1998 10:56:00 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (49 lines)
[log in to unmask] wrote in message ...
>just another way of doing it:
>
>setvar afile,'gp' +'![hpyear * 10000 + hpmonth * 100 + hpdate]'
>
>Michael

Oh course the only problem with this is when you hit the year 2000 you will
get a 3 digit date for the first 9 months (1/1/2000 would be 'gp101' with
the above formula) and then after that you will get a 4 digit date until the
year 2001.  To insure that you get the proper number of digits you just need
to add 1000000 to the number so that everything naturally zero fills.  Of
course you now also have to get only the right 6 digits as well.

:setvar afile 'gp'+rht('![1000000+hpyear*10000+hpmonth*100+hpdate]',6)

or

:setvar afile 'gp'+rht('000'+'![hpyear*10000+hpmonth*100+hpdate]',6)

On 1/1/2000 you should get 'gp000101' with this formula.

Just my $.02 worth.



         )|||||(
         |     |
        (|-O-O-|)          o          o
         | ( ) |           oo .----. oo
         |     |            oo      oo
         |     |            (| ~  ~ |)
        / \   / \            |  ()  |
       /   \ /   \        .--.  --  .--.               .-----.
       |_|  V  |_|       /    \____/    \             /       \
       | |  V  | |      |                |           O--|__|   \
       | |  V  | |      |                |          (           |
 ------oOO---V-OOo--------oOO--------OOo----------------.  .----
| Michael P. Smith                                      |  |    |
| Sr. Systems Programmer                                (__)    |/|
| The Hertz Corporation    [log in to unmask] (work)             |/
| Oklahoma City, OK        [log in to unmask] (personal)         |
 ---------------------------------------------------------------
        (__) (__)          (___)   (___)                (___)

The thoughts, views and expressions contained in this message are those
of Michael P. Smith, and do not necessarily reflect those of the Hertz
Corporation.

ATOM RSS1 RSS2