What is WebDNA

WebDNA is a scripting and database system designed to easily build web applications.

WebDNA and BioType

BioType service is a biometric keystroke dynamic system. It will be part of WebDNA 8.5

Download WebDNA

Download WebDNA freeware, try it and register later if you want.

WebDNA resources

The list of all WebDNA instructions.
WebDNA
Software Corporation
Search WebDNA Site
 Menu


HOME


DOWNLOADS


LEARN


EDUCATION


NEWS


COMMUNITY


STORE


SUPPORT


CONTACT

Re: [WebDNA] Converting minutes to hours

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101180
interpreted = N
texte = Here is a simple version. I have a function somewhere that will let you specify decimal places, rounding, etc. But this should be what you are looking for: [math][HoursTotal]+(((floor((([MinutesTotal]+7)/60)*4))*15)/60)[/math] Depending on how you round, change the number '7' in the above formula. If you always round down, just change it to zero. If you always round up, change it to 14. Matthew Bohne wrote: > How do the minutes round? For instance, is 4:07 rounded to 4:00 or > 4:15? What about 4:58? > > Suzanne Swift wrote: >> I'm trying to convert minutes to hours to simplify a payroll >> process. My minutes are tallied in either 15, 30 or 45 minute >> increments. In order to add the hours and minutes together properly, >> I need to figure out a way to convert the minutes to part of an hour >> and then multiple by the pay rate. Does anyone know how to do this >> using WebDNA version 3.0? >> >> Here's a code snippet... >> >> Total Time worked: [HoursTotal] hrs and [MinutesTotal] minutes

>> Total Cost: $[math][HoursTotal]*[lookup >> db=my.db&value=[Employee]&lookInField= Employee&returnField= >> Employee_Rate¬Found=][/math]
>> >> Thanks! >> Suzanne >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> old archives: http://dev.webdna.us/TalkListArchive/ >> >> > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > > Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Converting minutes to hours (Brian Fries 2008)
  2. Re: [WebDNA] Converting minutes to hours (Jeffrey Jones 2008)
  3. Re: [WebDNA] Converting minutes to hours (Terry Wilson 2008)
  4. Re: [WebDNA] Converting minutes to hours (Suzanne Swift 2008)
  5. Re: [WebDNA] Converting minutes to hours (Suzanne Swift 2008)
  6. Re: [WebDNA] Converting minutes to hours (Suzanne Swift 2008)
  7. Re: [WebDNA] Converting minutes to hours (Terry Wilson 2008)
  8. Re: [WebDNA] Converting minutes to hours (Matthew Bohne 2008)
  9. Re: [WebDNA] Converting minutes to hours (Gary Krockover 2008)
  10. Re: [WebDNA] Converting minutes to hours (Matthew Bohne 2008)
  11. [WebDNA] Converting minutes to hours (Suzanne Swift 2008)
Here is a simple version. I have a function somewhere that will let you specify decimal places, rounding, etc. But this should be what you are looking for: [math][HoursTotal]+(((floor((([MinutesTotal]+7)/60)*4))*15)/60)[/math] Depending on how you round, change the number '7' in the above formula. If you always round down, just change it to zero. If you always round up, change it to 14. Matthew Bohne wrote: > How do the minutes round? For instance, is 4:07 rounded to 4:00 or > 4:15? What about 4:58? > > Suzanne Swift wrote: >> I'm trying to convert minutes to hours to simplify a payroll >> process. My minutes are tallied in either 15, 30 or 45 minute >> increments. In order to add the hours and minutes together properly, >> I need to figure out a way to convert the minutes to part of an hour >> and then multiple by the pay rate. Does anyone know how to do this >> using WebDNA version 3.0? >> >> Here's a code snippet... >> >> Total Time worked: [HoursTotal] hrs and [MinutesTotal] minutes

>> Total Cost: $[math][HoursTotal]*[lookup >> db=my.db&value=[Employee]&lookInField= Employee&returnField= >> Employee_Rate¬Found=][/math]
>> >> Thanks! >> Suzanne >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> old archives: http://dev.webdna.us/TalkListArchive/ >> >> > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > > Matthew Bohne

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCatalog for Postcards ? (1997) For those of you not on the WebCatalog Beta... (1997) Error: Too many nested [xxx] contexts (WebTen only) (1997) Re:Copyright ? (1997) Hello??? (1997) [Fwd: F3 database munching] (1997) form data submission gets truncated (1997) rotating thumbnails (1997) Include remote? (1998) NetForms for mail, sorry (1998) Showif, Hideif reverse logic ? (1997) [WebDNA] eCommerce in 7.0 but not in 7.1? (2012) WC2.0 Memory Requirements (1997) sorting and grouping (1998) HELP WITH DATES (1997) Updating fields from different platforms (1998) [OT] Robust order processing (2003) WebCat2b15MacPlugin - showing [math] (1997) (2000) MacAuthorize order data fields WAS:How To question... (1997)