DAYS-HOURS-MINUTES functionmodule....

Hai all..
Can any one tell me a function module which converts days in to hours and also a function module which can convert hours in to minutes.Will be thankful if u can even give me the details of the import and export parameters to be passed
Will be rewarded if helpful...
Thanks & Regards,
Jhansi

Hi Kiran,
You please try this function module for Days to Hrs Conversion 
   SD_CALC_DURATION_FROM_DATETIME.
Please reward points if helpful.
Thanks,
Rajesh.

Similar Messages

  • I am looking for a timer that shows elapsed time since a particular date and time.  Showing days, hours, minutes etc.

    I would like to download an application for my desktop and maybe even my iphone that will tell me how many days, hours, minutes, etc have elapsed since a particular date.
    For example, my brother just had a baby and I want to put that date and time into the app and then determine how long it has been since that date and time.
    Hopefully this makes sense, because I have not been able to locate anything.
    Thanks in advance,

    This is fantastic.  Thank you.
    Is there any way to have something like this displayed on my desktop showing the time as it ticks away?

  • Adding day/hour/minute/second to a date value

    How does one add a day/hour/minute/second to a date value?

    SQL> select to_char(sysdate, 'DD/MM/YYYY HH24:MI:SS') to_day,
      2         to_char(sysdate+1, 'DD/MM/YYYY HH24:MI:SS') add_day,
      3         to_char(sysdate + 1/24, 'DD/MM/YYYY HH24:MI:SS') add_hour,
      4         to_char(sysdate + 1/(24*60), 'DD/MM/YYYY HH24:MI:SS') add_minute,
      5         to_char(sysdate + 1/(24*60*60), 'DD/MM/YYYY HH24:MI:SS') add_second
      6  from dual
      7  /
    TO_DAY              ADD_DAY             ADD_HOUR            ADD_MINUTE          ADD_SECOND
    10/10/2006 11:54:23 11/10/2006 11:54:23 10/10/2006 12:54:23 10/10/2006 11:55:23 10/10/2006 11:54:24
    SQL>Cheers
    Sarma.

  • 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

  • Latest itunes shows silly days approximation instead of days, hours, minutes, seconds, how do i change back?

    itune 11.0.0.163 shows silly date approximation on bottom bar rather than days, hours, minutes, seconds as before. How do I change this?

    Apple buried the transfer purchases option, but it's still there. To transfer purchases from your iOS device in iTunes:
    Select the device toward the top-middle of iTunes (underneath the status area/progress bar/Apple logo).
    Go to the File menu.
    Select Devices
    Click on Transfer Purchases from [DeviceName]...

  • Showing a measure as days/hours/minutes

    Hi gurus, I need you help quickly:)
    I have a report that shows duration of time for certain actions. The only measure in the report is hours (with two decimals). I want the measure to be shown as e.g. 4 days, 4 hours, 30 minutes instead of 100,5 (hours). Is this possible. Sorry if the question is noob

    Thank you very much! Works just as it should!:)
    EDIT: Realized that my measure was MINUTES, not HOURS ...
    But that´s good cause editing the formula provided by Sandeep forced me into really understanding it:)
    If it helps anyone, here´s what you put in the column formula if you want number of MINUTES converted to days, hours, minutes:
    cast(floor(column_name/1440) as char)||'days'||' '||cast(floor(mod(column_name,1440)/60) as char)||'hours'||' '||cast(mod(mod(column_name,1440),60) as char)||'minutes'
    Edited by: SJV4-ever on 2011-mar-16 08:42

  • Date difference in Days,hours minutes and seconds.

    Hi All,
    I have two date Suppose one is getdate() and other one is gatedate() +1 .I have to show the difference, currently I used a datediff in the stored proc which just shows the difference of the days :( but i need to show the difference in days:hours:minutes:seconds if possible.
    its a countdown with the current date. Like the two fields are sale_start_date and sale_end_date. Hope i am clear.
    Please let me know ASAP thanks in advance.Can anyone help me?all help is great help.
    Say the difference of
    12/6/2007 7:00:00 AM, 12/8/2007 8:00:00 AM  as 2 days 1:00:00)
    Thanks
    N

    One of the problems of using DATEDIFF when dealing with either seconds or milliseconds is that this function will result in execution errors if the start and end dates span then entire domain of possible dates.  Below is an alternative that seems to work over the entire date domain.  A couple of things to note:
    1. This select converts the days and seconds of each date into BIGINT datatypes to avoid the overflow error
    2. This select uses a CROSS APPLY operator; in this case I chose CROSS APPLY to suggest the possibility of converting this select into an inline table function.
    I suspect that if you dig around this forum and the net that you will find a better routine, but here is yet another alternative:
    declare @test table
    ( startDate datetime, endDate datetime)
    insert into @test values
    ('6/1/9', getdate()),
    ('6/9/9 15:15', '6/10/9 19:25:27.122'),
    ('6/9/9 15:15', '6/10/9 13:25:27.122'),
    ('6/9/9', '6/10/9 00:00:01'),
    ('1/1/1760', '12/31/2999')
    select
      startDate,
      endDate,
      [Days],
      [Hours],
      [Minutes],
      [Seconds]
    from @test
    cross apply
    ( select
        cast((endSecond - startSecond) / 86400 as integer) as [Days],
        cast(((endSecond - startSecond) % 86400) / 3600 as tinyint) as [Hours],
        cast(((endSecond - startSecond) % 3600) / 60 as tinyint) as [Minutes],
        cast((endSecond - startSecond) % 60 as tinyint) as [Seconds]
      from
      ( select
          86400 * cast(convert(integer, convert(binary(4),
                        left(convert(binary(8), startDate),4))) as bigint)
            + cast(convert(integer, convert(binary(4),
                right(convert(binary(8), startDate),4)))/300 as bigint)
          as startSecond,
          86400 * cast(convert(integer, convert(binary(4),
                        left(convert(binary(8), endDate),4))) as bigint)
            + cast(convert(integer, convert(binary(4),
                right(convert(binary(8), endDate),4)))/300 as bigint)
          as endSecond
      ) q
    ) p
    /* -------- Sample Output: --------
    startDate               endDate                 Days        Hours Minutes Seconds
    2009-06-01 00:00:00.000 2009-06-22 08:28:36.670 21          8     28      36
    2009-06-09 15:15:00.000 2009-06-10 19:25:27.123 1           4     10      27
    2009-06-09 15:15:00.000 2009-06-10 13:25:27.123 0           22    10      27
    2009-06-09 00:00:00.000 2009-06-10 00:00:01.000 1           0     0       1
    1760-01-01 00:00:00.000 2999-12-31 00:00:00.000 452900      0     0       0
    (5 row(s) affected)
     EDIT:
    I based the routine more-or-less on Thilla's reply.
    Kent Waldrop

  • 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

  • Convert Format Day, Hour, Minute, Seconds in Hours

    Hi all,
    I have one report generate by VoIP application like this:
    Total of hour has showed in Day (4). hour (20): Minute (26): seconds (06) summarize 4.20:26:06
    I need convert this format only how like 116 (hours) 26 (twenty six) Minutes 06 (Six) seconds. summarize 116:26:06
    How I can make this?
    Regards!
    Douglas Filipe http://douglasfilipe.wordpress.com

    Hi,
    I'm marking the reply as answer as there has been no update for a couple of days.
    If you come back to find it doesn't work for you, please reply to us and unmark the answer.
    Thanks
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "[email protected]"

  • How to get two date difference in Day/hour/min/secs pl

    First of all,
    Hello to All, i am new to Oracle DB, but i have little experience in Other Database such as Sybase, sql server etc
    please kindly help me
    in DoctorChart table i have DocName,Id#,Citcotype,Medtype,AdmitDate,DischargeDate(both admitdate & Discharge date is date formatted columns)
    so how can i get the below differenceTime (which means Dischargedate-Admit Date in below format i.e, Day,Hours,Minutes,Seconds...)
    DoctorName, ID #, Citco type, MEDtype, DifferenceTime
    ========= === ======= ======= ===========
    Dr. KindaEmesko, 20045, Replace OutCard, ICH, 0 day 9 hours 11 minutes
    Dr. KindaEmesko, 20098, Replace OutCard, ICH, 1 day 2 hours 34 minutes
    Dr. KindaEmesko, 20678, Replace OutCard, ICH, 2 day 23 hours 52 minutes
    Dr. KindaEmesko, 20212, Replace OutCard, ICH, 4 day 1 hours 00 minutes
    Dr. KindaEmesko, 20345, Replace OutCard, BED, 3 days 14 hours 15 minutes
    Dr. KindaEmesko, 20678, Replace OutCard, BED, 9 days 21 hours 52 minutes
    Dr. KindaEmesko, 20015, Signature Overlay, Rest, 0 days 3 hours 29 minutes
    Dr. KindaEmesko, 45678, Signature Overlay, Rest, 0 days 1 hours 29 minutes
    Same way how can i get the Average Time for the above result (without ID columns)
    DoctorName, Citco type, MEDtype, Avg DifferenceTime
    ========= === ======= ======= ===========
    Dr. KindaEmesko, Replace OutCard, ICH, 2 day 1 hours 00 minutes
    Dr. KindaEmesko, Replace OutCard, BED, 6 days 17 hours 15 minutes
    Dr. KindaEmesko, Signature Overlay, Rest, 0 days 2 hours 29 minutes
    Please just tell me how to get the two dates difference as day/hour/minute format
    as well as how to get avg ( two dates difference as day/hour/minute format)
    Please Help me
    Thanks in advance

    Well, instead of all these suggested manipulations you can simply use intervals. Oracle uses day as a unit in date arithmetic, so Dischargedate-Admit Date is number od days between two dates. Built-in function numtodsinterval can be used to convert it into interval. For example:
    SQL> with t as (
      2             select trunc(sysdate) - 2 Admit_Date,
      3                    sysdate            Discharge_Date
      4               from dual
      5            )
      6  select  numtodsinterval(Discharge_Date - Admit_Date,'DAY') Hospital_Stay
      7    from  t
      8  /
    HOSPITAL_STAY
    +000000002 00:01:08.000000000
    SQL>  SY.

  • Transform a cell with avalue of mintues to another cell to show hours:minutes

    I would like to use be able to fill out one cell in plain mintues(for example 75 min) which I want to be shown in another cell as hours:minutes( 1hrs:15min).

    HI Micke,
    What you use in column D depends on what you actually want or need the result to be—a duration value, including units (h and m), a number representing the number of hours and fraction of hour with the unit label in the next column, or a text value showing the number of hours and the number of 'extra; minutes including unit labels.
    The value in column B is a number, which, according to your original question, you want to display in column D as a duration in hours and minutes.
    The English language function to do that is DURATION. Here's the syntax for regions where the decimal separator is a period.
    DURATION(weeks, days, hours, minutes, seconds, milliseconds)
    In my localization, the formula in D would be =DURATION(,,,B)
    In your localization DURATION would be replaced by the Swedish name for this function, and the three commas would be replaced by semi colons:
    =FUNCTIONNAME(;;;B)
    Format the cell in column D as DURATION with hours and minutes as the units to include in the display.
    Although that will convert the number in B to a duration in D, the labels "Min" and "Hrs" in the cells to the right of theseclls in the image of your table implies that what should be in both of these cells should be a number value representing the number of minutes (B) and the number of hours, including (decimal) fractional hours (D) with the unit shown by the label in the adjacent column.
    =B/60
    Formatted to show two places after the dcimal will show the number representing hours and hundredths of hours equivalent to the number of minutes shown in column B.
    If you are using this value in further calculations, this may be the best type of value to place in this cell.
    If the cell is for display only, you can build a text string displaying the number of hours and minutes (with whatever labels you wish to put in for Hrs and Min using QUOTIENT and MOD
    =QUOTIENT(B,60)&" Hrs "&MOD(B,60)&" Min"
    This is a text value, and can't be used in further calculations. (but the calculations could probably be revised to use the value in B.
    Regards,
    Barry

  • How to show number of days:hours:min:second

    Hi !
    Need your help on this one:
    I have to calculate the number of (  Days;Hours:Minute:Second  ) that a ticket have been opened
    But I have a problem to display the format that I want:  DD:HH:MM:SS
    EX:the ticket have been opened 2011-05-03 11:00:00
    first I create a formula to show number of second to show how long the ticket have been opened since the currentDate in seconds
    Formula Name is:
    {@number of seconds OpeningTime}
    Crystal Syntax:
    DateTimeVar dt1:= {@DTOpenDate};
    DateTimeVar dt2:= {@CurrentDateTime};
    If dt2 >= dt1 Then
    NumberVar ds:= (Date(dt2) - Date(dt1))*86400; 
    NumberVar hs:= (Hour(dt2) - Hour(dt1))*3600; 
    NumberVar ms:= (Minute(dt2) - Minute(dt1))*60;
    Numbervar ss:= Second(dt2) - Second(dt1);
    NumberVar ts:= dshsms+ss)
    Else
    NumberVar ds:= (Date(dt2) - Date(dt1))*86400;
    NumberVar hs:= (Hour(dt2) - Hour(dt1))*3600;
    NumberVar ms:= (minute(dt2) - Minute(dt1))*60;
    NumberVar ss:= Second(dt2) - Second(dt1);
    NumberVar ts:= dshsms+ss)
    then I create another formula to display the format that I want:Ex:if the ticket have been opened for about 25hh:00mm:00ss
    i want to show 01:01:00:00
                             DD:HH:MM:SS
    Formula name: {@DTConversionOpeningTime}
    I use Crystal Syntax:
    WhilePrintingRecords;
    StringVar Days1;
    StringVar Hours1;
    StringVar Minutes1;
    StringVar Seconds1;
    NumberVar Duration:=0;
    Duration:= {@number of seconds OpeningTime};
    If Duration < 0 Then
      "Cannot have a time less than zero"
    Else
      (Days1:=ToText(Truncate(Duration/86400),0);
    Hours1:=ToText(Truncate(Duration/3600),0);
      Minutes1:=ToText(Truncate(Remainder(Duration,3600)/60),0);
      Seconds1:=ToText(Remainder(Remainder(Duration,3600),60),0));
    //Display format
      (if length(Hours1) < 2 then '0')+ Days1 + ":" +
      ["0",""][length(Hours1)]+ Hours1 + ":" +
      ["0",""][length(Minutes1)] + Minutes1 + ":" +
      ["0",""][length(Seconds1)] + Seconds1;
    Thanks for your help

    Find a solution, see thread:
    Re: Converting a calculated field into format of dd:hh:mm:ss answered by Jason Long

  • To display Days Hours Mins Format based on business hours

    Hi,
    I want to display Days Hours Mins Format.
    I am Having two columns Like below,
    Col1 (in days)    col2 (In Hours : Mins)
    3days  4:5 
    In this first have to  add Col1 and Col2 (Here one day is equals to
    9 hours ) so the addition is 31.5
    from this 31.5 i should display 3 Days 4 Hours 30 Mins because 31.5 contains 3 (9 hours) days 4 Hours and .5 is equals to 30 mins.
    Kindly please help me in this,
    thanks in advance.
    GVRSPK VENI

    Hello gvespk,
    Regarding your description, are you looking for some sample as below?
    DECLARE @T TABLE
    ID VARCHAR(99),
    SubID INT,
    Days INT,
    Hours FLOAT
    INSERT INTO @T VALUES
    ('abz', 1, 2, null)
    ,('abz', 2, null, 3 )
    ,('abz', 3, 3, 4 )
    ,('abz', 4, null, null )
    ,('abz', 5, 2, null )
    ,('abz', 6, 1, 5 )
    ,('abz', 7, null, 2 )
    ,('abz', 8, null, null )
    ,('abz', 9, 2, 3 )
    ,('abz', 10, null, 2.5 );
    SELECT SUM(DAYS)+FLOOR(SUM(HOURS)/9) DAYS
    , FLOOR(SUM(HOURS)-FLOOR(SUM(HOURS)/9)*9) AS HOURS
    , (SUM(HOURS)-FLOOR(SUM(HOURS)))*60 MINUTES FROM @T
    DAYS HOURS MINUTES
    12 1 30
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • How do I get a time value in days, hours and minutes returned to a cell from a calculation of distance divided by speed?

    How do I get a time value in days, hours and minutes returned to a cell from a calculation of distance divided by speed?

    Simon,
    you can use the duration function:
    B4=DURATION(0,0,B1/B2)
    you can further, format the cell as a duration like this using the cell inspector:

  • Convert days into days, hours and minutes

    Hi,
    In my report there is a column "# of Days (Submitted to Completed)" and the result I am getting is like 2.4, 3.5, 1.8 etc. Client requirement is to convert 2.4 days into days, hours and minutes (2 days 9 hours 36 minutes)
    The value of "# of Days (Submitted to Completed)" is calculated during ETL.
    Can you please tell me how to achieve this result.
    Thanks

    Create a formula where you could use the CAST function and calculate for the remainder by multiplying 24 for hours and 60 for minutes.

Maybe you are looking for