Converting seconds to minutes format

Post Author: mwatson
CA Forum: WebIntelligence Reporting
How do you convert seconds to minutes in mm:ss format?

Post Author: SKodidine
CA Forum: WebIntelligence Reporting
totext(truncate(/60),0,'','') & ":" & totext(remainder(,60),0,'','')

Similar Messages

  • Convert seconds to minutes 121 (seconds) to 2:01.

    I receive a variable only in seconds. I'm trying to convert
    it to minutes when greater than 60.
    i.e. 121 (seconds) to 2:01.
    Can anyone help with the code. I got this far:

    quote:
    Originally posted by:
    Kronin555
    <cfset minutes = duration / 60>
    <cfset seconds = duration mod 60>
    <cfoutput>#minutes#:#numberformat(seconds,'00')#</cfoutput>
    Thanks so much! I was confused at first because the numbers
    coming up with many decimal points making their accuracy pretty
    much unreadable to me so I changed to:
    int(minutes)#:#numberformat(seconds,'00')#

  • Convert seconds to HHMMSS format

    Hi All,
    Is there any function module to convert given no. of seconds,  to HH:MM:SS format . If seconds lessthan 86400, then we convert it in straight forwad way by usoung MOD formula. If sec >= 86400 then also i need get in format 24:MM:SS format.
    For example if sec = 86440, then after conversion format would be 24:00:40. Any FM to convert in this format. Please advise.
    Thanks
    Konda Reddy

    http://www.google.co.in/#hl=en&q=ConvertsecondstoHHMMSS%2B+SAP&meta=&aq=&fp=2cf627ce33d082a9

  • Seconds to minutes

    Hi,
    I need to convert seconds to minutes and also determine if the units digit in minutes is from 1-9. How can I do this?
    For example if I have 120 seconds i.e 2 minutes i need to check if 2 is within range 1-9.

    Basically everything except zero satisfies your range. Is that what you are checking for. If yes, here's the query:
    WITH tab AS (SELECT   1 seconds FROM DUAL
                 UNION ALL
                 SELECT   120 seconds FROM DUAL
                 UNION ALL
                 SELECT   300 FROM DUAL
                 UNION ALL
                 SELECT   540 FROM DUAL
                 UNION ALL
                 SELECT   541 FROM DUAL
                 UNION ALL
                 SELECT   12000 FROM DUAL)
    SELECT   (seconds / 60)  time, CASE WHEN substr((seconds / 60), -1)  between 1 and 9 THEN 'Within Range' ELSE 'Out of Range' END
                Range_Boundary
      FROM   tab;
    Time                                                                                              Range_Boundary
    0.0166666666666666666666666666666666666667
    Within Range
    2
    Within Range
    5
    Within Range
    9
    Within Range
    9.01666666666666666666666666666666666667
    Within Range
    200
    Out of Range

  • Convert seconds to [h]:mm:ss format on report text box

    I want to convert seconds to hh:mm:ss format on the report text box.
    I use =Format(Sum([MyTime])/(24*60*60),"hh:nn:ss"), but it does not work if the hours more than 24 hours, since the format is for  the time format for the day.
    I need the result shows more than 24 hours, because I want to show how many hours and minutes from my seconds value.
    I can use [h]:mm:ss for Excel that it gives me the total hours more than 24 hours.
    I tried to use the following to my text box
    Int((sum(MyTime)) / 3600) & Format(Int((sum(MyTime) / 60) Mod 60, "\:00") & Format(sum(MyTime) Mod 60, "\:00"),
    but for some reason it only shows seconds part without minute and hour part of the value.
    Your help and information is great appreciated,
    Regards,
    Souris,

    I want to convert seconds to hh:mm:ss format on the report text box.
    I use =Format(Sum([MyTime])/(24*60*60),"hh:nn:ss"), but it does not work if the hours more than 24 hours, since the format is for  the time format for the day.
    I need the result shows more than 24 hours, because I want to show how many hours and minutes from my seconds value.
    Hi sourises,
    You can use the next function. Place it in a general module.
    Function Sec_to_str(seconds)
    Dim uur As Integer
    Dim min As Integer
    Dim sec As Integer
    Dim cur_sec As Variant
    cur_sec = seconds
    If (IsNull(cur_sec)) Then
    Sec_to_str = Null
    Else
    sec = cur_sec Mod 60
    cur_sec = cur_sec \ 60
    min = cur_sec Mod 60
    cur_sec = cur_sec \ 60
    uur = cur_sec
    If (uur = 0) Then
    Sec_to_str = Format(min, "#0") & ":" & Format(sec, "00")
    Else
    Sec_to_str = Format(uur, "#0") & ":" & Format(min, "00") & ":" & Format(sec, "00")
    End If
    End If
    End Function
    Imb.

  • Convert seconds to Days, hours, Minutes, Seconds in Reporting Services

    Hi Guys,
    Im currently reporting of an analysis services cube, however I have value which is in seconds and would like to report on this in reporting services as day:HH:MM:SS.
    Has anyone got any experience reporting in this format?
    Regards
    Dave

    Hi Dave,
    We can use custom code to convert seconds to HH:MM:SS
    Public Function Calculate(ByVal TotalSeconds as Integer) as String
    Dim Hours, Minutes, Seconds As Integer
    Dim Hour, Minute, Second As String
    Hours = floor(TotalSeconds/ 3600)
    IF Hours<10
       Hour="0" & Hours.ToString
    Else
       Hour=Hours.ToString
    End IF
    Seconds = TotalSeconds Mod 3600
    Minutes =floor( Seconds / 60)
    IF Minutes<10
       Minute="0" & Minutes.ToString
    Else
       Minute=Minutes.ToString
    End IF
    Seconds = Seconds Mod 60
    IF Seconds<10
       Second="0" & Seconds.ToString
    Else
       Second=Seconds.ToString
    End IF
    Return Hour & ":" & Minute & ":" & Second
    End Function
    Then we can use the expression to conver it.
    =Code.Calculate(Fields!Column.Value)
    The report looks like below:
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Converting seconds to hh:mm:ss format?

    Hi, can anyone help me with a formula in Webi XIR2 to convert seconds to hh:mm:ss in the result cell on the report level? Now we have results in the cells in seconds and should have this format: 00:04:12  for 0h 4min et 12 s.
    Thanks in advance.
    Laurent Peter

    Hi,
    If you want to do this at the report level then try the following.
    Create a new Variable and define it as:
    =FormatNumber(Floor(<Column_Name>/3600) ,"00") & ":" & FormatNumber(Floor(Mod(<Column_Name> ,3600)/60) ,"00") & ":" & FormatNumber(Mod(Mod(<Column_Name> ,3600) ,60) ,"00")
    In the above formula Column_Name is the attribute that displays the seconds.
    - Noman Jaffery

  • Regarding function module to convert hours to minutes and seconds to minute

    hi all,
        is there any function module to convert hours to minutes and seconds to minutes....if so please guided me....i hav req like this...want to convert all those to minutes[seconds and hours]....

    Hi,
    Use FM
    SD_CALC_DURATION_FROM_DATETIME
    Pass paramters like
    I_DATE1 16.09.2008
    I_TIME1 10:33:00
    I_DATE2 16.09.2008
    I_TIME2 19:00:00
    and you will get the result as below..
    E_TDIFF 8:27
    8 hours and 27 minutes...
    Now u can use this values of hours and minutes to get the exact wage type values... get the details from HR module and multiply it with the hours and minute and calculate it...
    Use Offsets and get the hour and minute value from E_TDIFF
    Hope it will solve your problem..
    Thanks & Regards,
    Naresh

  • Converting seconds to hours + minutes + seconds

    hey all,
    was just looking for the quickest way to convert seconds to hours + minutes + seconds
    eg, 18084 s is 5h, 1m, 24s.

    You can use the Apache Commons Lang DurationFormatUtils class
    import org.apache.commons.lang.time.*;
    public class SecondsConversion {
         public static void main(String[] args) {
              try {
                   int seconds = 18084;
                   int milliseconds = seconds * 1000;
                   String[] values = DurationFormatUtils.formatDuration(milliseconds, "H m s").split(" ");
                   System.out.println(values[0] + "h " + values[1] + "m " + values[2] + "s ");
              } catch (Exception e) {
                   e.printStackTrace();
    }

  • Converting seconds to HH:MM:SS

    Apologies if this has been answered already, but I'm simply trying to convert seconds to HH:MM:SS. If someone could point me to how Numbers can best handle that I'd appreciate it.
    Here's an example: The CSV I receive has a duration column that has the number 3718 in it, representing the total number of seconds. What I wish to see is it broken out to read 01:01:58.
    Thanks in advance.

    Hello
    I'm not sure that I understand well your question.
    Numbers is right: B2:B4 is not a number, it's a range of cells.
    Your formula is trying to use this range of cells as a number representing the minutes: it's meaningless. The number of minutes may be given two ways
    B2B3B4
    This way the formula would be =TIME(0,B2B3B4,0)
    an alternate way (more efficient) is
    SUM(B2:B4) (which means sum of the contents of every cell from B2 thru B4
    This way the formula would be =TIME(0,SUM(B2:B4),0)
    If you looked at the Help you would have read:
    TIME
    The TIME function converts hours, minutes, and seconds into a time format.
    TIME(hours, minutes, seconds)
    hours: The number of hours (using a 24-hour clock).
    minutes: The number of minutes.
    seconds: The number of seconds.
    Notes
    You can specify hour, minute, and second values greater than 23, 59, and 59, respectively. If the hours, minutes, and seconds add up to more than 24 hours, Numbers subtracts 24 hours repeatedly until the sum is less than 24 hours.
    If you don't wish to see the seconds appearing in the cell, apply the format Time > hh:mm
    I agree with most users about the need for enhancements about the time treatment, mainly the addition of a "Duration" format not limited to the range 0 thru 23:59:59.
    BUT for the questions asked in this thread no enhancements are required.
    The available tolls fit perfectly the needs … but of course, users must read the given explanations
    I'm always surprised to see guys paying to learn to use a bicycle and many other tools but reluctant to learn how to use softwares they are employing daily.
    I never accepted the well known acronym: RTFM (Read The Fu…g Manual).
    In fact I never read a manual, but I consult them when I need an info.
    I always thought that forums are here to respond to questions whose responce is not in the manuals (and they are sufficiantly numerous).
    Of course, it is often more time consuming to explain this advice than reproducing some lines from the manual but I think that no one may seriously use a tool begging the info for every task.
    We are assumed to be thinking beeings. Aren't we ?
    Of course the given formulas assumes that the time value is fitting the Numbers's requirements (from 0 thru 23:59:59)
    Yvan KOENIG (from FRANCE jeudi 3 janvier 2008 13:38:55)

  • Seconds to minute and seconds conversion

    Say I have an int:
    int time = 1500
    which means that there are 1500 seconds in time and I would like to convert that to the format of
    25:00
    which is 25 minutes and 0 seconds
    what I did so far is
    System.out.println(time/60 + time%60);and it always gives me the result of 25:0 instead of 25:00, how do I deal with this??

    System.out.printf("%1$02d:%2$02d\n",time / 60, time % 60);{color:#000080}See{color}
    http://java.sun.com/javase/6/docs/api/java/io/PrintStream.html#printf(java.lang.String, java.lang.Object...)
    http://java.sun.com/javase/6/docs/api/java/util/Formatter.html#syntax
    {color:#000080}db{color}

  • Convert second to hh:mm

    PLEASE, IS THERE A EASILY METHOD TO CONVERT
    A 5 DIGIT NUMBER IN SECOND TO THE FORMAT
    HH:MM (HOUR AND MINUTE)
    THANKS

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Carter:
    This solution is completely wrong.
    For example, if n = 7100, you should get an answer of 1:58 (rounded down to the nearest second). With the above method, you get an answer of 1:97.
    Try select floor(n/3600) | |':'| | round (mod (n, 3600) / 60) from dual;<HR></BLOCKQUOTE>
    Carter is right.In my apps,I use that as what Carter say.It works perfectly.
    null

  • How to convert sysdate to the format dd-mon-yyyy

    how to convert sysdate to the format dd-mon-yyyy

    <how to convert sysdate to the format dd-mon-yyyy>
    This question is better answered by thinking about about how Oracle dates work. SYSDATE is a pseudocolumn (function without any arguments) that returns a date value: it already is a date. Oracle date values are stored not as we see them, say 'DD-MON-YY', but as a series of bytes with the different date components from the millennium down to the second. We NEVER see dates as they are stored but use the formats for automatic conversion.
    To display a date the way you want use TO_CHAR() with an edit mask or as others suggested change your NLS_DATE_FORMAT (thought I advise against this as most systems use DD-MON-YY and porting queries from other systems or even OTN can easily break). To change a converted string back to a date use TO_DATE() with an edit mask.

  • Convert Seconds to Hours

    Hi
    I would like to convert seconds to hours -
    I have tried the below two -
    select to_char(to_date(176400,'SSSSS'),'HH:MI:SS') from dual;
    SELECT NUMTODSINTERVAL (176400, 'minute') FROM DUAL;
    Regards

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible. Remove all tables and columns that play no role in this problem.
    Always say which version of Oracle you're using.
    If you have a number of seconds (s), you can find the equivalent number of hours (h) if you divide s by the number of seconds in an hour, 60 * 60 = 3600.
    SELECT  s
    ,       s / 3600     AS h
    FROM    table_x
    ;H won't necessarily be an integer. If you want an integer, use a rounding function: ROUND, TRUNC, FLOOR or CEIL

  • I am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    i am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    When you make a DNG that's like making another raw file, so you will need to convert the DNG file just like your original raw. Don't use the Save button in the raw converter. That's just a link to the DNG converter. Normally you would click Open instead and then save in the editor as a jpg or other image format of your choice.

Maybe you are looking for

  • Missing data in weekly EWA report

    Hello SDN, I have run weekly EWA reports for our productive ECC5 system through SolMan 3.1 for some time, but recently I've noticed that some information is missing from the report. Section 11.2 (Response Times) includes a graph showing the Top 5 tra

  • How to display different text for labels in Group Above Report Oracle Repor

    Hello, Is there a way to change the text that is displayed in Labels in a Group Above Report? For example, I have a Group Above report with my columns of data and above the columns I have my column labels, but I would like to be able to display vario

  • How to implement adf skins in JDeveloper 11g

    How to integrate CSS in ADF using JDeveloper 11g without Trinidad.

  • PE9 Wedding template issues

    Hi everyone, I'm the super happy recent owner of PE9, and I started my first projects recently, one of which is a wedding ceremony. As I used the first available wedding template called "mariage extérieur" (must be something like ouside wedding or so

  • Extracting audio from short clips

    My previous post/question seems to have disappeared so I apologise for a repeat: I'm noticing (and this started happening just recently) that it takes now about 10 minutes to extract audio from even very short clips (10 seconds long, say). It used to