User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 397,703 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,426 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:

Easy question: Decimals to time

Join Date: Mar 2007
Posts: 2
Reputation: japat is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
japat japat is offline Offline
Newbie Poster

Easy question: Decimals to time

  #1  
Mar 2nd, 2007
I am using c++ and would like to know the easiest way to turn decimals in to the form hours:minutes:seconds.

You can assume the integer is in the form of hours (e.g. 242.4 = 242 hours 24 seconds etc)

Also, I would like it so that seconds is to one decimal place, and that if a field is blank it will show up like this 00:00:00.0

Thanks heaps :mrgreen:
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 1:32 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC