Convert minutes to hh:mm:ss

I have a column which holds the minutes (see example below), i need this converted to hh:mm:ss
236
233
232
212
Thanks,

If it falls below a day use
CONVERT(varchar(8),DATEADD(minutes,[column],0),108)
I had the to change the MINUTES to MINUTE as it wasn't recognised.
But now I get the following error message
Msg 8116, Level 16, State 1, Line 1
Argument data type nvarchar(max) is invalid for argument 2 of dateadd function.
Sorry tht was a typo
do a cast then
CONVERT(varchar(8),DATEADD(minute,CAST([column] AS int),0),108)
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • Create a new column - convert minutes(mins) to time (HH: MM) in a day-OBIEE

    Hi..
    I have an issue in building the OBIEE repositoryin Administration tool.
    I have a column of minutes (24hrs X 60 = 1440 mins in a day) as its values.
    I need to build a column of Time ( convert minutes into time) using existing column of minutes.
    Say 300 mins = 5:00AM (since -------> (60 X 5 =300))
    315 mins = 5:15 AM
    330mins = 5:30 AM
    360mins = 6:00 AM.......so on in a day.
    I appreciate your help.
    Thank you.
    Edited by: user11939829 on Aug 11, 2010 9:00 AM

    Hi,
    In Admin Tools, if you want to create a new colume as time(HH:MM), you can do it like this:
    1. in "Business Model and Mapping", in the table which you want, create a logical column "Time"
    2. Check the checkbox "Use exist logical column as the source"
    3. In the expression builder, write the formula to convert minutes to time, like:
    concat(concat(cast (minutes/60 as varchar(2)) , ':'), cast(mod(minutes,60) as varchar(2)))
    Hope this helps you
    Marc

  • Converting "minutes.seconds.milliseconds" to "seconds.milliseconds"

    Hello
    I have string (string a = 1.15.67) which represents time (minutes. seconds. milliseconds).
    Which is the easiest way to get a Double which holds the above mentioned time, where minutes are converted to seconds (double b = 75.67)?
    Should i convert the above mentioned String to a Date object first or is this not neccesary?
    Edited by: user10496629 on 17.03.2011 14:03

    jduprez wrote:
    To be honest, my knowledge of FP arithmetic comes mostly from reading this forum, and I'm sure you contributed to such discussions in the past - so I'm surprised to read your arguments.
    Except myself I would use integral types (int, or long to be conservative) to hold the number of seconds/milliseconds. I don't see what double would bring except inaccurracy that will build up when you add/combine multiple durations.Yeah, but given that he wants the end result to include a fractional piece, he's going to have inaccuracies anyway?
    Not if he stores the number of milliseconds, and only formats it at display time.Oh, I see what you're saying now.
    Still, unless he's dealing with very large scales, he can store as a double, format for display, and any inaccuracies will wash out in the format. That is, even though 12345.67 cannot be stored in a double, most likely he will be able to ignore that, store 12345.67000000001, and format it so that it displays as 12345.67.
    Whether that or a separate integer piece representation is more appropriate depends on other requirements and use cases that the OP hasn't shared with us. :-)
    >
    And it's highly likely that the integer numbers of minutes, seconds, and millis that are represented individually will be exactly representable by double.
    In fact, if he keeps millis and seconds in their expected ranges, it's guaranteed that they are, and the only possible parsing inaccuracy is in minutes, and even then, the entire range of int can be exactly represented, so it'd be an awful lot of minutes before he started losing precision there.Either I misunderstand you, or what you say is not correct:
    System.out.println(0.1D+0.2D+0.3D);Results in:
    0.6000000000000001
    But when you format for display, you'll get 0.600.

  • How to convert minutes to decimal

    I need to convert my minutes in my HH:MM record to decimal.
    For example if I have 43 hours and 15 minutes (43:15) I need to return the result 43.25 hours
    and if i have 10 hours and 30 minutes I need to return 10.50 hours.
    How do I do this?

    How do I do this?
    The simple answer: with math.
    Longer answer: parse it using list functions and then do some math.  Like this:
    <cfset MyTime = "43:15">
    <cfset hours = ListFirst(MyTime, ":") > <!--- get the hours part --->
    <cfset minutes = ListLast(MyTime, ":") > <!--- get the minutes part --->
    <cfset decimalMinutes = minutes / 60 > <!--- Calculate minutes as decimal of an hour --->
    <cfset MyDecimalTime = hours + decimalMinutes > <!--- Put it all back together as decimal hours --->
    Or, in more terse form:
    <cfset MyTime = "43:15">
    <cfset MyDecimalTime = ListFirst(MyTime, ":") + (ListLast(MyTime, ":") / 60) >
    HTH,
    -Carl V.

  • How to convert minutes into centiminutes

    In Excell I can use (time)*24 and get the value as centiminutes is there a simular way to do et in Numbers?

    "The data in cell D2 is 7h44m45s and the result is 7.245833 centiminutes
    so I belive it works"
    Assuming the "." is the decimal separator, that result says that a duration of more than seven hours is the same as a duration of approximately seven centiminutes.
    Seven centiminutes is seven hundredths of a minute, which is less than five seconds.
    Let's look at the math on 'paper':
    7 hours = 420 minutes (7x60)
    44 minutes = 44 minutes
    45 seconds = 0.75 minutes
    Total: 464.75 minutes
    which is 46475 centiminutes
    See Row 2.
    The closest I can get to your numerical result is by using =DUR2DAYS(B2)*24, or STRIPDURATION(B2)*24  both of which give the result 7.74583333... (hours). See the yellow filled rows above.
    DUR2DAYS converts a duration value to the equivalent number of days and decimal fraction of days. Multiplying that by 24, the number of hours in a day, gives the number of hours and decimal fraction of hours represented by that value.
    Regards,
    Barry
    PS: must have been in a hurry earlier.
    I notice I said "centiseconds" in my reply to Bressen above—should have been "centiminutes".
    And in my reply to my own earlier message, I said the duration value was in F5, while the formula clearly required it to be in B2.
    My bad!
    B
    EDIT
    PPS:
    I was able to get 7.2458333... after all. That is the correct value for the conversion of 7h 14m 45s to hours.
    B
    Message was edited by: Barry

  • Convert :-  Minutes to Days:Hours:Minutes

    Hi Friends ,
    I want to convert the time value from MINUTE to  HH : MM : SS  
    I mean in input i have to pass  200 Minutes and in Output i want to get the no of hr and minutes in the format  03 : 20  ( HH:MM) . I have used the FM "CONVERSION_EXIT_SDURA_OUTPUT" for this .
    This works fine for  time input values upto 5 digits  like  ( 20000 minutes) =  333:20 (HH:MM) ,
    when the input value is more than 5 digits , ex - 200000 this FM does not work .
    Is there any FM where i can get the conversion from MINUTE to HH :MM:SS  or from Minutes to DAYS :HPURS:MINUTES .
    I have searched SDN , but i dint get the exact FM which i want ,
    If any body has any idea on the same please guide me on the same .
    Regards
    Parbhudutta

    Thanks all for all of your valuable inputs .
    IBy using FM : MONI_TIME_CONVERT  , i am able to get  HH:MM:SS  format data by giving input as seconds .
    But the issues i have is , i have  data as input in seconds which is noear to a 10 digit number like
    200000000 seconds , which does not work  for this FM .
    I have input data in MINUTES which is near to 10 digit , exmp -  239879798 minutes . So i want to convert this no to ( DAYS : HOURS : MINUTES : SECONDS )
    Other FMs that has been given by you guys i have checked but i am not able to get exactly what i want .
    Anyway thanks again .
    Reagards
    Prabhudutta

  • Convert minutes to Timestamp

    Hi folks,
               Is there any function module which converts the minutes into Timestamp (HH:MM:SS) format...Pls suggest me..
    Thanks in advance,
    Shyam.

    HI,
    i didnt read question carefully.
    hope this will help.
    Create the following formula:
    //Replace 1.38 with your number or number field
    NumberVar nbrTime := 1.38;
    NumberVar nbrHour := Truncate(nbrTime);
    NumberVar nbrHold := (nbrTime-nbrHour)*100;
    nbrHold := (60*nbrHold)/100;
    NumberVar nbrMinute := Truncate(nbrHold);
    nbrHold:= (nbrHold-nbrMinute)*100;
    NumberVar nbrSecond := Truncate(nbrHold*60)/100;
    ToText(nbrHour,0,"") + ":" + ToText(nbrMinute,0,"") + ":" + ToText(nbrSecond,0,"")
    This formula will display a number field in the 'hh:mm:ss' time format.
    or the one already suggested is correct .
    Function module              MONI_TIME_CONVERT
      Import parameters               Value
      LD_DURATION                     70
      Export parameters               Value
      LT_OUTPUT_DURATION                00:01:10

  • Change minutes in data type T

    Hi All,
           Is there any FM to convert minutes into time format.
    For example i have 103.8 i.e 103 minutes and 8 seconds and i wanna have as 01:43.80.
    Regards.

    hi,
    could not find any function module....
    here is a very crude logic for this purpose (from a type p variable initially)
    please help yourself in improving this logic in terms of performance.....:-)
    DATA tm1 TYPE p VALUE '103.84' DECIMALS 2.
    DATA : v_frac TYPE p DECIMALS 2 ,
           v_trunc TYPE p DECIMALS 2,
           v_str TYPE string,
           v_int TYPE i,
           v_mod TYPE i,
           v_rem TYPE i,
           v_mod_hrs TYPE i,
           v_rem_hrs TYPE i.
    WRITE :/ 'initial : ', tm1.
    v_trunc = TRUNC( tm1 ).
    v_frac = FRAC( tm1 ).
    v_str = v_frac.
    v_str = v_str+2(2).
    WRITE :/ 'split : ', v_trunc, v_frac.
    v_int = v_str.
    v_mod = v_int / 60.
    v_rem = v_int MOD 60.
    WRITE :/ 'from decimals part : ', v_mod, 'minutes', v_rem, 'seconds'.
    ADD v_mod TO v_trunc.
    WRITE :/ 'new : ', v_trunc, 'minutes', v_rem, 'seconds'.
    v_mod_hrs = FLOOR( v_trunc / 60 ).
    v_rem_hrs = v_trunc  MOD 60.
    WRITE :/ 'final  : ', v_mod_hrs, 'hours', v_rem_hrs, 'minutes', v_rem, 'seconds'.
    rgds,
    PJ

  • Convert hr:mm:ss to days

    Hello,
    Is there any FM to convert hr:mm:ss to days.
    Eg. 240000 to 1 days; 120000 to 0.5 days.
    Thanks,
    Shreekant

    Hello Shreekant,
    May be this can help you.
    [Convert :-  Minutes to Days:Hours:Minutes;
    Thanks,
    Jayant Sahu

  • HH:MM format which converting from SSRS to excel

    Hi All;
    Below is my query for converting minutes to hh:mm format which runs fine
    ct.new_totalhours AS 'Total Hours', 
    CAST(ct.new_totalhours / 60 AS VARCHAR(10)) + ':' + RIGHT('0' + CAST(ct.new_totalhours % 60 AS VARCHAR(2)), 2) AS [HH:MM], 
    I am using HH:MM field in my ssrs report to display the result 
    But wjen exported to excel the properties for HH:MM shows general 
    Is there a way to convert in hh:mm format in excel ?
    Any suggestion much appreciated
    Thanks
    Pradnya07

    Hi Simran08,
    In your case, we can use DateValue() function to get a Date value containing the time information represented by a string. Please refer to the following expression:
    =TimeValue(Fields!TotalHours.Value)
    After that, modify the Number property with Time format. Then, we can get the corresponding format values.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How to update PO Price only for a single line item and not other Line Item

    Hi
    My requirement is not to update Price of PO from PIR if the Final Invoice Indiactor is not set and it is not a return PO. I am trying to do this using
    BAPI_PO_CHANGE to update price automatically from Pricing record using
    POITEM-PO_ITEM = '00001'
    POITEM-CALCTYPE = 'B'.
    POITEMX-PO_ITEM = '00001'
    POITEMX-CALCTYPE = 'X'.
    The price gets updated for the line item 1 as well as other line item which I do not want. Please can you tell how to restrict that.
    Is it possible to restrict through configuration if this indicator is set there should be no price update. I tried to check in ME22n and if I update the condition item by pressing the update button the other item price also gets updated.
    Thanks
    Arghadip

    Timestamp is date and time together in one field..
    Search for data element TIMESTAMP.
    If you are getting this in your table.
    If you are getting time and date in different fields then you can use the function module
    given below....
    CALL FUNCTION 'DELTA_TIME_DAY_HOUR'
      EXPORTING
        t1            =
        t2            =
        d1            =
        d2            =
    IMPORTING
       MINUTES       =
    Then you can convert minutes into seconds..
    Function module credit to BrightSide it works....but only it will give difference in minutes
    Regards,
    Lalit Mohan Gupta.

  • How to calculate Time difference for a single line item

    Hi All,
    I have an issue where you have to calculate the Start time and End Time , Start Date and End Date for a particular Work item number
    For eg ;
    WI_ID WI_CD WI_CT
    000001312610 02/09/2009 09:48:4 02/09/2009 09:48:9
    000001312610 02/09/2009 09:54:4 02/09/2009 09:54:9
    000001312610 02/09/2009 09:54:5 02/09/2009 09:54:9
    000001312610 02/09/2009 10:07:0 02/09/2009 10:07:9
    000001312610 02/09/2009 10:07:0 02/09/2009 10:07:9
    000001312610 02/09/2009 10:16:5 02/09/2009 10:16:9
    000001312610 02/09/2009 10:16:7 02/09/2009 10:16:9
    Similarly I get the Endtime and ENd dayfrom other table for same work item.So my requirement here is
    in the it should show the display in a single cell .as, 5secs, 5 secs,4 secs,9secs,4 secs,2 secs
    for each work item.
    Can any body help me on this issue.
    Any pionters for this are much helpful for me.
    Thanks
    Rohini.

    Timestamp is date and time together in one field..
    Search for data element TIMESTAMP.
    If you are getting this in your table.
    If you are getting time and date in different fields then you can use the function module
    given below....
    CALL FUNCTION 'DELTA_TIME_DAY_HOUR'
      EXPORTING
        t1            =
        t2            =
        d1            =
        d2            =
    IMPORTING
       MINUTES       =
    Then you can convert minutes into seconds..
    Function module credit to BrightSide it works....but only it will give difference in minutes
    Regards,
    Lalit Mohan Gupta.

  • Date field difference calculation

    Hi all,
    I am new to Adobe and Java scripting so apologies if this has already been answered elsewhere - I have not been able to find it if it has.
    I want to calculate the difference between two dates fields in hours and mins on a form.
    I have two fields, both Date format (dd/mm/yyy HH:MM), a Start and End date and I want the difference between them in the Time format HH:MM.
    Can anyone help me with the script for this? What I have so far is:
    var strStart = this.getField("StartTime").value;
    var strEnd = this.getField("EndTime").value;
    if(strStart.length || strEnd.length)
    var dateStart = util.scand("dd/mm/yyyy HH:MM",strStart);
    var dateEnd = util.scand("dd/mm/yyyy HH:MM",strEnd);
    var diff = dateEnd.getTime() - dateStart.getTime();
    // One Day = (24 hours) x (60 minutes/hour) x
    // (60 seconds/minute) x (1000 milliseconds/second)
    var oneMin = 60 * 60 * 1000;
    var mins = Math.floor(diff/oneMin);
    event.value = util.printd("HH:MM",mins);
    But this is not working...
    Mary

    The result can be formatted using:
    // format result using "h:MM" format
    event.value = util.printf("%,0 0.0f" + ":" + "%,002.0f", nHours, nMinutes);
    One cannot use the date or time formats since the time values will be limited to the hours and minutes values for 1 day, so any time value that is over 23 hours 59 minutes is not possible.
    A full script solution including document level functions for conversion of date strings to minutes and converting minutes to a time string:
    // reusable document level functions;
    function Time2Num(cFormat, cDate) {
    // convert date value with format to number of minutes form Epoch date;
    var oDate = util.scand(cFormat, cDate);
    var nMins =  null;
    if(oDate ==  null) app.alert("Error converting " + cString + " using " + cForamt);
    else nMins = oDate.getTime() / (1000 * 60);
    return Math.floor(nMins);
    } // end Time2Num format
    function Num2Time(cFormat, nMins) {
    // convert number of muniutes to h:MM or HH:MM format;
    // return formatted string for valid formats;
    // return null for invalid formats;
    var cElapsed = null;
    // test for nMins being a number;
    if(isNaN(nMins)) {
    app.alert("Minutes must be number",0, 0);
    } else {
    var nHours = Math.floor(nMins / 60);
    var nMinutes = Math.floor(nMins % 60);
    switch(cFormat) {
    case "h:MM":
    cElapsed = util.printf("%,0 0.0f" + ":" + "%,002.0f", nHours, nMinutes);
    break;
    case "HH:MM":
    cElapsed = util.printf("%,002.0f" + ":" + "%,002.0f", nHours, nMinutes);
    break;
    default:
    app.alert("Invalid format " + cFormat + "\nMust be \"HH:MM\" or \"h:MM", 0, 0);
    break;
    return cElapsed;
    } // end Num2Time function
    // end document level funcitons;
    // custom calculation script;
    event.value = ''; // clear result;
    var strStart = this.getField("StartTime").value;
    var strEnd = this.getField("EndTime").value;
    if(strStart.length || strEnd.length) {
    var nDateStart = Time2Num("dd/mm/yyyy HH:MM",strStart);
    var nDateEnd = Time2Num("dd/mm/yyyy HH:MM",strEnd);
    var nMins = nDateEnd - nDateStart;
    // format result using "h:MM" format
    event.value = Num2Time("h:MM", nMins);
    // end custom calculation script;

  • Ripping Dvd's

    I am trying to use my new ipod and i was wondering does Super DVD to Ipod Converter,rip dvds to your computer and then convert them so itunes can use it? Please answer this somebody who know this!!!
      Windows XP  

    I tries Super DVD-iPod Converter, but with the DVDs I tried (Lion King and Fight Club) it didn't work. As far as I know, these DVDs needed to be Decrypted first. When I tried so, I didn't have sound with Super DVD-iPod Converter.
    Cucusoft's converter immediately worked: it ripped the DVD and converted it all at once.
    For me it's the best alternative!
    Let me suggest you download trials of both programs (just Google both converters and add "free download". You'll find plenty of sites!). When you do so, REMEMBER those are Trial Versions. This implies that texts like "Trial Version" spoil your picture! You have to buy it to remove the texts. However, the trials are good for testing though! (Unless you want to convert complete DVDS in Trial, try to not fully convert the film, but Abort after a couple of minutes. At least Cucusoft's converter provides the opportunity to watch that couple of converted minute!)
    Good luck!

  • Problem with changing double to int!

    Hi guys. I've got a major headache trying to solve this problem, and I'm hoping maybe someone abit wiser than I could help me out.
    I've added two lots of code, one where if I input 10 as the distance I get an answer of 423.529411..etc. However I want it to display this as just 423seconds. Then print on the next line 'to Travel 10 takes 0 hours, 7mins and 3 seconds. Instead it prints 0.1117etc hours and 7.0574738 minutes and 3.529etc seconds.
       public static double enterDistance()
             System.out.println("Type the travel distance: ");
             distance = UserInput.readDouble();
             if (distance < 0)
                  System.out.println("Illegal Distance Value");
                  distance = 0;
                  enterRoadType();
                  enterDistance();
             return distance;
        public static void calcTime()
             enterRoadType();
             time = enterDistance()/speed; // time in secs
             tottime = tottime + time; //total time in hours
             System.out.println("To travel " + distance + " takes " + (time*60*60) + " seconds");
              System.out.println("To travel " + distance +" takes " + time + " hours and " + (time*convert%convert) + " minutes and " + (time *convert*convert%convert) + " seconds");
              Totaltime = Totaltime + (time*convert*convert);
              Totaldistance = Totaldistance + distance;        
        }So to try and get it to do what I want, I change this line:
    time = enterDistance()/speed; // time in secsto
    time = (int)(enterDistance()/speed); // time in secsHowever then it prints that it takes 0 seconds, 0 hours, 0 mins.
    Argh I'm so lost.
    Any help is appreciated

    I see you use (time*60*60) to display your seconds,
    this means that time = enterDistance()/speed; // time in secs is actually wrong
    So my guess is that you either or using wrong units for your speed or distance.
    I think if you try time = (int)(60*60*enterDistance()/speed); you will not get 0 for your time but i would focus on why your seconds arent seconds first

Maybe you are looking for

  • Installing Freehand 11 on mac os 10.8.2

    Dear forum, I just bought Freehand 11, surprisingly I cannot install it on my Imac intel based. After searching , Freehand is a dead application which Adobe didn't care at all. Is there anyway I can use Freehand? Is there a legal statement that menti

  • AP Discount on Vendor Payment

    Hi FI Gurus, Can you please help with the below.... When I run Payment program for Vendor (Transaction F110), system is taking/considering the discount amount even after the expiry of the cash discount period (as per vendor/invoice payment terms). Id

  • I dont have imovie on my iphone 6 64gb now after that i restored it from itunes

    i bought my iphone 6 64 gb and i had imovie and all the apples on it preinstalled now that i restored it from itunes i dont have the apps and when i go to app store it asks me to buy them i want them for free as i had them when i first used my phone

  • Lumia 630 email subfolder sync problem

    Hi, I recently bought a Lumia 630 phone and to my annoyance I have noticed that it does not sync my Exchange subfolders. I have configured the Exchange account correctly and I get all of my emails from inbox synced exactly like they should but I can'

  • Migrating iPod from Windows to Mac

    I've just given up on my creaky old PC and have a new Mac, but my iPod still has Windows software. I think I saw a tech note which told me what I have to do to move my iPod into Mac, but I can't find it and it's not intuitive.