• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

How to get only max value from variable in nested for loop  RSS feed

 
Sheriff
Posts: 5917
155
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, tom!

What specifically do you need help with?  It looks like a question was asked and answered.  

In the future, avoid just pointing simply pointing to a URL as your question.

Also TellTheDetails (that's a link). Questions like "it doesn't work" and "I need help" are too broad.  We don't know what you need help with.
 
tom novy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need help with this code. Result is :

jon 15
bob 38
steve 180
bob 14
steve 240
steve 180
luk 203
but i espected like this :

jon 15
bob 38
steve 240
luk 203

max value from loop of user

cod is:




table example:

 user    in     out
 steve  7:00    9:30
 steve  8:00   10:00
 steve  9:00   11:00


I want trim intersection. if 8:00 between 7:00 and 9:30 then 10:00-7:00 result 3h if 9:00 between 7:00 and 9:30 then 11:00-7:00 result 4h if 9:00 between 8:00 and 10:00 then 11:00 - 8:00 result 3h. in this example I want result be 4h if contition is true  
if 9:00 for this example is not between 7:00 and 9:30 or not between 8:00 and 10:00 then result to be 10:00 - 7:00 = 3h

 
Would you turn that thing down? I'm controlling a mind here! Look ... look at the tiny ad ...
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!