Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minutes from Remainder of Day Calc

Status
Not open for further replies.

binway

MIS
Nov 9, 2003
21
0
0
AU
Hi Team,
I have a field that is in minutes called DurationMinutes. I can calculate the days by doing DurationMinutes / 1440. This will give me a figure with a decimal eg 3559 minutes = 2.471527 days. I would like to get the remainder of .471527 and convert it to minutes by * by 360. In this case it should be about 169 minutes. I tried mod(DurationMinutes,1440)* 360 but it does not seem to be working. Can anyone point me in the right direction.

Regards

Binway
 
Hi binway,

I take it that your 'DurationMinutes' field will never have more minutes than there is in a period with 360 days..because you are working in days..?

[pipe] "We know nothing but, that what we know is not the truth..." - Me
 
If mod doesn't work for you, how about the integer divide or integer functions?

soi la, soi carre
 
Thanks for that Team,
I used a calc along the lines of (DurationMinutes / 1440) - integer-divide(DurationMinutes / 1440). Seems a bit clunky but it is working fine, for integer-divide I think floor may have worked as well.


Regards

binway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top