• 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Assistance with time schedule  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


So I have created a rental time, however its not displaying the time correctly - I need it to calculate in hours how long its been rented for. Also how to make a weekend null

This is how it compiles

Please enter day of your rental
Monday
Please enter day of your return
Tuesday
Please enter your start time (hh)
1000

Enter finish time (hh) 1600
Rental Time: 04

Process finished with exit code 0



Thanks in advance
 
Bartender
Posts: 5303
55
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Take more time to re-read the code you wrote. On line 29 you assigned to "daysoftheweek" and then on line 34 you overwrite it. On line 36 you convert the string to upper case, then on line 38 you compare it to a string of mixed case.
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!