?
Solved

Convert int to date

Posted on 2010-01-04
2
Medium Priority
?
349 Views
Last Modified: 2012-05-08
Hello Experts,

I had an error today with a formula to calculate the time spent in a Task List.

I used: =TEXT([Due Time]-[Start Time]],"h:mm")

But I did not have the expected result (it not calculates if more than 24 hours).

So I applied this formula: =INT(([Due Date]-[Start Date])*1440)
It shows the minutes spent.

Doubt:

How do I convert this integer value to hours: minutes?,

Example;

Start Time: 10:00 AM
Due Time: 11:15 AM
Result: 75

Desired Result: 1:15

Thx


0
Comment
Question by:br_ms
2 Comments
 
LVL 24

Accepted Solution

by:
mankowitz earned 2000 total points
ID: 26170754
you need the modulo operator to do that.

hours = int(INT(([Due Date]-[Start Date])*1440) / 60)
minutes = INT(([Due Date]-[Start Date])*1440) % 60

Then you do something like text( hours & ":" & minutes)
0
 

Author Closing Comment

by:br_ms
ID: 31672348
Ok, thx
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When installing SharePoint 2010 RTM I came across a strange error, I was getting timeouts during the installation. I searched the web and found the best solution to be found here (http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010genera…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question