Re: 09:45:00 -> 9.75

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 38690
interpreted = N
texte = Clip off the minutes and divide by 60?This works:[text]hours=09:45[/text] Hours and minutes worked=[hours]
[math show=f]hoursworked=[math]([listwords words=[hours]&delimiters=:][showif [index]=1][word][/showif][/listwords])+([listwords words=[hours]&delimiters=:][showif [index]=2][word][/showif][/listwords]/60)[/math])[/math]Fractional hours worked=[hoursworked]See this in action here http://www.novaderm.com/test/testthis.tplThere might be a spiffier way to do it - I tried to make it cleaner by placing the [math]s inside of a single [listwords] but couldn't get that to workGood luck,Will Starck NovaDerm skin care science http://www.novaderm.com techs@novaderm.com 800-378-1740----- Original Message ----- From: Aaron Lynch To: WebCatalog Talk Sent: Tuesday, September 18, 2001 7:58 PM Subject: 09:45:00 -> 9.75 > I have a bunch of times in a database, in 24hr form. > > I need to be able to figure out the hours between em. > > This code: [math time]({[out]}-{[in]})-({[in.lunch]}-{[out.lunch]})[/math] > > Gets me 09:45:00 which is the right amount of time. > > But I'd like to display that as 9.75 and I can't seem to figure out how. > > > > -- Aaron Lynch > System Administrator > NineWire Digital Solutions || http://ninewire.com > > > > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > Web Archive of this list is at: http://search.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: 09:45:00 -> 9.75 (Arturo Vargas 2001)
  2. Re: 09:45:00 -> 9.75 (Will Starck 2001)
  3. 09:45:00 -> 9.75 (Aaron Lynch 2001)
Clip off the minutes and divide by 60?This works:[text]hours=09:45[/text] Hours and minutes worked=[hours]
[math show=f]hoursworked=[math]([listwords words=[hours]&delimiters=:][showif [index]=1][word][/showif][/listwords])+([listwords words=[hours]&delimiters=:][showif [index]=2][word][/showif][/listwords]/60)[/math])[/math]Fractional hours worked=[hoursworked]See this in action here http://www.novaderm.com/test/testthis.tplThere might be a spiffier way to do it - I tried to make it cleaner by placing the [math]s inside of a single [listwords] but couldn't get that to workGood luck,Will Starck NovaDerm skin care science http://www.novaderm.com techs@novaderm.com 800-378-1740----- Original Message ----- From: Aaron Lynch To: WebCatalog Talk Sent: Tuesday, September 18, 2001 7:58 PM Subject: 09:45:00 -> 9.75 > I have a bunch of times in a database, in 24hr form. > > I need to be able to figure out the hours between em. > > This code: [math time]({[out]}-{[in]})-({[in.lunch]}-{[out.lunch]})[/math] > > Gets me 09:45:00 which is the right amount of time. > > But I'd like to display that as 9.75 and I can't seem to figure out how. > > > > -- Aaron Lynch > System Administrator > NineWire Digital Solutions || http://ninewire.com > > > > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > Web Archive of this list is at: http://search.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Will Starck

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:

Now you see it now you donīt (1997) flushdatabases (2000) Help name our technology! (1997) Webcat2, WebCommerce, Mod 10 etc. (1997) HTTP header line is too long? (1997) Sorting by date (1997) Almost a there but..bye bye NetCloak (1997) Announcing general availabilty of WebDNA 4.5 release (2002) Decrypt Acting Strange With Form (2004) [append] vs. [appendfile] delta + question? (1997) Configuring E-mail (1997) Great product and great job ! (1997) [shell] (2002) Re[2]: Using the sendmail command on CGate Pro (Unix) (2000) Dubble Sku's in a Database (1999) WebCat2: Found Items syntax, etc. (1997) [BULK] [WebDNA] Alt Web Servers OS X (2011) Re:no [search] with NT (1997) E-mail/Invoice (1998) Emailer [cart] file names (1997)