HP Forums
Entering dates into a user program - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Entering dates into a user program (/thread-10797.html)



Entering dates into a user program - Randall - 05-25-2018 03:40 AM

[Image: XJWjO9c.jpg]

This screen shot is from the finance app - bond calculations.

Date entry is efficient (Settlement Date and Maturity Date).

At startup, the last date value is displayed. If running several bond scenarios one or both date values may not change from the previous entries. If so, the date is already populated.

If a date does change the user can (1) use the edit soft key or (2) select today's date using a soft key or (3) use the calendar icon to select a date.

With practice dates can be quickly entered compared to my own date entry code using msgbox.

In reading the programming chapter I found msgbox examples but did not see a way to duplicate the finance app method of entering dates.

Is it available so that I can use it in my own programs?

Thanks


RE: Entering dates into a user program - DrD - 05-25-2018 08:47 AM

From here: http://holyjoe.org/hp/PrimeVars.htm

You can find:

DateOne stores the first date used in a date calculation. Use the format YYY.MMDD n ► DateOne, where n is YYYY.MMDD, sets the value of DateOne to n.

DateTwo stores the second date used in a date calculation. Use the format YYYY.MMDD n ► DateTwo, where n is YYYY.MMDD, sets the value of DateTwo to n.

Helpful?

-Dale-


RE: Entering dates into a user program - Randall - 05-26-2018 02:43 PM

yes, the list is helpful. will keep it handy.

System date is also available. One can even create new app variables using AVars.

In the meantime, I programmed the customizing an app example in the programming chapter of the manual.

Not sure modifying an app works for me but learned a bunch.

Going to study the other programming examples in the chapter.

Thanks


RE: Entering dates into a user program - Tim Wessman - 05-26-2018 04:17 PM

Have you looked at the new CHOOSEDATE command? Can't do 2 at once, but should be quite quick.


RE: Entering dates into a user program - Randall - 05-29-2018 09:27 PM

No I had not seen choosedate. Ran a short example Looks like it is used in the financial app.

That gives me a user interface method to use for date entry.

Thanks