Publish or Perish Software Press.  Oakland, California, USA.

 

 

Contact Us

in association with

Pocket WorkSheet Samples

Sample Date

For date calculations on your PDA, also see DOYDIFF for Palm or Pocket PC 2002/2003in our Software Gallery.  Or try our FREE online Date Calculator.

This example is specific to Pocket Worksheet for Pocket PC 2002. This worksheet contains several common examples of date calculations. It discusses important topics such as days difference versus period and the correct sequence for date operations.

A short and long form of the worksheet are shown below. Commentary text is removed in the short form to emphasize functional content.

 

Short Sample Date

                               0   C ShortDate
                           DATE    
                     DIFFERENCE    
                       1/1/2003   +
                       8/6/2002   -
D                            148   = ( 4 Mos  3 Wks 5 Days )*
                               0   C
                       COMPUTE A    
                           VALUE    
                       BASED ON    
                       NUMBER OF    
                           DAYS    
                             148   + *( 4 Mos 3 Wks  5 Days )
$                          5.00   X Save 5.00/day
$                        740.00   =
                               0   C
                       COMPUTE A    
                         FUTURE    
                     DATE BASED    
                           ON AN    
                       ESTIMATED    
                       SCHEDULE    
                       8/6/2002   + START
D                              1   - Period Adjustment
W                              4   + WEEKS FOR PROJECT "A"
D                              3   + DAYS FOR PROJECT "B"
                       9/5/2002   = COMPLETION DATE
                               0   C
                         HOW TO    
                     ADJUST FOR    
                         PERIODS    
                               0   C
                       1/1/2003   +
D                              1   + Adjust Days Result for Period
                       1/1/2003   -
D                              1   = ( 1 Day )
                               0   C
                                    
                                     If the target of the computation is a DATE,
                                     subtract 1 DAY from the initial DATE before any
                                     other entries to insure the resulting DATE correctly
                                     reflects the end DATE.
                               0   C
                       1/1/2003   +
D                              1   - Adjust Date Result for Period
D                              1   +
                       1/1/2003   =
M                              1   + Add a month
                       2/1/2003   = Display the result of a month more
M                              1   + Add another month
                       3/1/2003   = Display the results again.
                               0   C
 

Sample Date with Full Commentary Text

                               0   C SampleDate
                                     Pocket WorkSheet (c) Publish or Perish Software
                                     Press, 2002
                         SAMPLE    
                           DATE    
                                     This worksheet contains several common examples of
                                     date calculations. It discusses important topics
                                     such as days difference versus period and the
                                     correct sequence for date operations.
                                    
                           DATE    
                     DIFFERENCE    
                                     To compute the difference between two dates, tap menu
                                     View/Calendar. Select a significant future date.
                                     Tap the Enter button on the Calendar.
                       1/1/2003   +
                                     Tap menu View/Calendar again. Select a date prior
                                     to the first date. Tap the Enter button on the
                                     Calendar View.
                       8/6/2002   -
                                    
                                     Tap the = button to display the result. The numeric
                                     result is in DAYS DIFFERENCE. The calculator
                                     automatically generates a breakdown by Year, Month,
                                     Week, Day in the Text Column.
D                            148   = ( 4 Mos  3 Wks 5 Days )*
                                    
                                     The trailing asterisk indicates the row is "in
                                     Use" elsewhere in the worksheet. We'll
                                     demonstrate Use in the next section.
                                    
                                     NOTE
                                    
                                     Date arithmetic is restricted to + and -. If
                                     you need to perform other operations on a Days
                                     Difference, such as we will do below, you must "Use"
                                     the result outside of a date context. Tap the Clear
                                     button after a series of Date operations to
                                     re-enable all normal operations.
                                    
                                     Tap the CLEAR (C) button to clear the current total.
                               0   C
                                    
                       COMPUTE A    
                           VALUE    
                       BASED ON    
                       NUMBER OF    
                           DAYS    
                                     Next we'll "Use" the Days Difference from above to
                                     compute how much money can be saved in a certain
                                     amount of time.
                                    
                                     Tap the row containing the Days Difference in the
                                     EQUAL (=) operation above to select it. Tap the Use
                                     button. Tap the + button. That row is now "In Use".
                             148   + *( 4 Mos 3 Wks  5 Days )
                                    
                                     Next we'll compute how much we can save in that number
                                     of days.
                                    
                                     Assume we can save $5.00 a day. Tap the Format button
                                     (top left button on the calculator's Keypad) until
                                     the currency symbol appears.
                                    
                                     Tap 5 . 0 0, then tap the MULTIPLY (X) button.
$                          5.00   X
                                    
                                     Tap the = button to display the total amount that can
                                     be saved.
$                        740.00   =
                                    
                                     Tap the CLEAR (C) button to clear the current total.
                               0   C
                                    
                       COMPUTE A    
                         FUTURE    
                     DATE BASED    
                           ON AN    
                       ESTIMATED    
                       SCHEDULE    
                                     In this example we'll establish a "Start" date,
                                     adjust for an end-period date result, and add the
                                     durations of several short "projects" to compute a
                                     completion date.
                                    
                                     Tap menu View/Calendar. Tap the Text Entry Box and type
                                     "START" on the Software Input Panel (SIP). Select
                                     08/06/2002 on the month Calendar. Tap the Enter
                                     button on the Calendar View.
                       8/6/2002   + START
                                    
                                     PERIOD ADJUSTMENT
                                    
                                     If you consider an "end date" the date upon which a
                                     project is completed, then you may want to include a
                                     "period adjustment", discussed below.
                                    
                                     If you regard the end date as the first date after
                                     which the project is complete, then you can
                                     disregard this adjustment.
                                    
                                     To make a period adjustment when adding time periods to
                                     a start date, subtract 1 from the start date, and
                                     then add the period days, weeks, months, or years.
                                    
                                     If a project started today and had a duration of 1
                                     day, it is technically finished today, not
                                     tomorrow! So, if we started with today's date and
                                     subtract 1 immediately for the adjustment, when we add
                                     1 day of duration for a project, we'll get today's
                                     date, which is what we want.
                                    
                                     Tap the Format button until "Days" appears on the
                                     button.
                                    
                                     Next tap the number 1 button and tap the - button
                                     to adjust the resulting date for "period" rather
                                     than "difference".
D                              1   -
                                    
                                     Now, we'll add the durations of several simple
                                     projects to compute a completion date.
                                    
                                     Tap the Text Entry Box and type text such as "WEEKS
                                     FOR PROJECT A. " Tap the Format button until "Wks"
                                     appears on the button. Tap 4. Tap the + button.
W                              4   + WEEKS FOR PROJECT "A"
                                    
                                     Tap the Text Entry Box and type text such as "DAYS FOR
                                     PROJECT B " Tap the Format button until
                                     "Days" appears on the button. Tap the number 3,
                                     then tap the + button.
D                              3   + DAYS FOR PROJECT "B"
                                    
                                     Tap the Text Entry Box and type "COMPLETION DATE". Tap
                                     the = button to display the resulting date 4 weeks and
                                     3 days from the selected date.
                       9/5/2002   = COMPLETION DATE
                                    
                                     Tap the C button to clear the result.
                               0   C
                         HOW TO    
                     ADJUST FOR    
                         PERIODS    
                                     If the target of the computation is in DAYS, add
                                     1 to the initial DATE (the date with the + operation)
                                     before any other entries, to convert the ultimate
                                     DAYS DIFFERENCE to a PERIOD.
                               0   C
                       1/1/2003   +
D                              1   + Adjust Days Result for Period
                       1/1/2003   -
D                              1   = ( 1 Day )
                               0   C
                                    
                                     If the target of the computation is a DATE,
                                     subtract 1 DAY from the initial DATE before any
                                     other entries to insure the resulting DATE correctly
                                     reflects the end DATE.
                               0   C
                       1/1/2003   +
D                              1   - Adjust Date Result for Period
                                    
                                     Let's add 1 day's duration for a project. We should be
                                     finished the same date as the start date.
D                              1   +
                       1/1/2003   =
                                    
                                     When computing a target DATE, it is perfectly OK to
                                     tap the = button to display intermediate results and
                                     continue adding entries. Let's do it.
M                              1   + Add a month
                       2/1/2003   = Display the result of a month more
M                              1   + Add another month
                       3/1/2003   = Display the results again.
                               0   C
                                    
                       WRONG WAY    
                                     DO NOT make the adjustment AFTER the MINUS (-) date.
                                     Operations following the minus date act on the LAST
                                     DATE entered.
                       1/1/2003   +
                       1/1/2003   -
D                              1   + This adds to the LAST DATE entered!
                                     Adding to the last date creates the equivalent of
                                     1/1/2003 MINUS (-) 1/2/2003. This may not be
                                     what you want to do.
D                            -1   = ( 1 Day )
                               0   C
                                     Do not add the adjustment after the EQUAL (=)
                                     operation, as the result is equivalent to adding to the
                                     MINUS date.
                               0   C
                       1/1/2003   +
                       1/1/2003   -
D                              0   = ( 0 Days )
                                     The row 1 + below is adding to the LAST DATE. Once
                                     again, this is equivalent to 1/1/2003 - 1/2/2003.
D                              1   +
D                            -1   = ( 1 Day )
                               0   C
                                    
                                     If you want to take a date difference and do some
                                     normal arithmetic with it, you can "Use" it outside of
                                     the date context.
                                    
                                     Let's take the difference between 2 dates, "Use" that
                                     value and add a value to it where it will NOT be
                                     influenced by the LAST DATE condition.
                       1/31/2003   +
                       1/1/2003   -
D                            30   = ( 4 Wks  2 Days )*
                               0   C
                                     "Use" the value out of the date context and add 1 to
                                     it.
                             30   + *( 4 Wks 2 Days )
                               1   +
                             31   =
                               0   C
                                    
                     CONCLUSION    
                                     The result of subtracting one date from another,
                                     giving DAYS DIFFERENCE, is NOT a PERIOD. If you were
                                     to subtract today's date from today, the difference
                                     is 0 but it represents a PERIOD of one day.
                                    
                                     You can easily adjust for PERIOD as described in HOW
                                     TO ADJUST FOR PERIODS above.
                                    
                                     It is recommended that the EQUAL (=) operation be the
                                     last operation in computing a DAYS DIFFERENCE or PERIOD
                                     based on a difference.
                                    
                                     We don't enforce that rule, but suggest that you
                                     understand how it works to prevent surprises.
                                    
                                     When computing a target DATE starting with an
                                     initial date and adding or subtracting Days, Weeks,
                                     Months, or Years, you can display results with
                                     multiple EQUAL (=) operations after each
                                     operation.
                                    
                                     These operations will act as expected.
                                    
                       1/1/2003   +
D                              1   +
                       1/2/2003   =
D                              1   +
                       1/3/2003   =
D                              1   +
                       1/4/2003   =
                               0   C
                                     Operations performed on a DAYS DIFFERENCE (difference
                                     between two dates) will act on the MINUS DATE (to
                                     increase or decrease the MINUS DATE) and should not
                                     be employed unless you understand fully what is
                                     going on.
                                    
                                     First, we'll perform two separate date calculations
                                     and take the difference between the resulting
                                     dates.
                       9/1/2002   + Date "A"
D                              7   +
                       9/8/2002   = Result Date "A"*
                               0   C
                       8/1/2002   + Date "B"
D                            14   +
                       8/15/2002   = Result Date "B"*
                               0   C
                       9/8/2002   + *Result Date "A"
                       8/15/2002   - *Result Date "B"
D                            24   = ( 3 Wks  3 Days )
                               0   C
                                     The following is equivalent to the calculations above:
                                     Short and sweet, but we inserted an EQUAL (=) after
                                     8/1/2002 to demonstrate the effect of adding 14 Days
                                     and ending up with "less".
                                    
                                     Note, however, that the result is exactly the same
                                     as that from the date calculations above.
                       9/1/2002   +
D                              7   +
                       8/1/2002   -
D                            38   = ( 1 Mo 1 Wk )
D                            14   + This ADDS to the MINUS DATE
D                            24   = ( 3 Wks  3 Days )
                               0   C
 


Copyright © 2004 Publish or Perish Software Press. All rights reserved.

3D Animated Flag -- by 3DFlags.com