Adding minutes to time

Terry Pickering pickering@myself.com
Thu, 03 Jun 1999 11:27:21 -0700


Here is part of some QUICK code for a time entry screen where the user enters a date, then the start time and end time and calculates the "elapsed time". Might give you some ideas for your situation.


define t-day-number num*1 = mod(days(work_date),7)


define  start_minutes num =     &

        nconvert(ascii(start_time,4)[1:2]) * 60                         &

        + nconvert(ascii(start_time,4)[3:2]) 


define  end_minutes num =       &

        nconvert(ascii(end_time,4)[1:2]) * 60                           &

        + nconvert(ascii(end_time,4)[3:2])


define  elapsed_minutes num =   &

        end_minutes - start_minutes


define  elapsed_time num =      &

        (elapsed_minutes / 60.0) * 100





<color><param>0000,0000,8080</param>Terry Pickering                      
  CompuGroup, Inc.

pickering@myself.com                    Portland, Oregon USA

www.teleport.com/~compugrp              Cessna 172 & Lancair ES</color>
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.