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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert to hours and minutes

Status
Not open for further replies.

livvie

Programmer
Apr 20, 2004
91
IE
I have a calculated field that gives me 1.333333 hours how do I convert this into 1.20mins ?
 
Instead of dividin get the Mod.

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Something like this ?
(TotMinutes \ 60) & "h" & (TotMinutes Mod 60) & "Mins"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
What's the correct syntax:
SUM(SETTINGH * 60 + SETTINGM)/60 is what I have at the moment ?
 
Try something like this:
(SUM(SETTINGH * 60 + SETTINGM) \ 60) & "h" & (SUM(SETTINGM) Mod 60) & "Mins"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I'm doing it in a query in ADP and it wont accept this syntax.
 
Can you ask the DBA for writing a SQL Server function doing the trick ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Sorry PHV I don't understand your question !!
 
Why don't you post your SQL so we can "see" the syntax you are using?

Leslie
 
Here it is
SELECT EDATE, EMPLOYEE, OPERATION, DOWNREASON, JOB_ID, SUM(SETTINGH * 60 + SETTINGM) / 60 AS Setup, SUM(RUNNINHH * 60 + RUNNINGM)/ 60 AS Run, SUM(DOWNHOURS * 60 + DOWNMINS)/ 60 AS Down, DOWNTIME
FROM tblctjor
GROUP BY EDATE, EMPLOYEE, OPERATION, DOWNREASON, JOB_ID, SETTINGH, SETTINGM, DOWNTIME
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top