Changing Seconds to Days.

Basicly, I have a large number, in seconds.
I want to change this to days and the remining in hours and minutes..
Basicly like..
0 DAYS 21 HOURS 31 Minutes
Any help? Thanks!

And yes I do understand, thank you.Out of curiousity, did you use concatenation or a StringBuilder/Buffer to build the String? If it's something like:
String output = days + " DAYS " + hours + " HOURS " + minutes + " MINUTES " + seconds + " SECONDS ";
return output;You're only getting quadratic performance. This would be better:
     StringBuilder output = new StringBuilder();
     output.append(days);
     output.append(" DAYS ");
     output.append(hours);
     output.append(" HOURS ");
     output.append(minutes);
     output.append(" MINUTES ");
     output.append(seconds);
     output.append(" SECONDS ");

Similar Messages

  • Converting seconds to Days,Hours,mins and secs

    Hi gurus,
    I have a metric in seconds , which is a box uptime . I want to convert that into Days,hours , mins and secs .How can I do that ?
    For example , If I have 433500 secs , I should show it as 5days 00:25:00 or in some meaningful format . Can anyone help me out ?
    Thanks,

    Hi,
    Refer thinks,
    Re: seconds to hh:mm:ss format
    OBIEE 11g - Change seconds to DD HH:MM:SS format
    Deva

  • How i can change te first day of the week?

    By default the week start in sunday and i want monday.
    In the siebelOnDemnad documentation i find some about one parameter named FIRST_DAY_OF_THE_WEEK in NQSConfig.INI but i don't know how to change it.

    I don't believe its possible to change the first day of the week.

  • Default timeframe for SC timeframe need to be changed to 90 days from 7 day

    Hi  All,
         In check status of the shopping cart (T-CODE = BBPSC04) by default we get   timeframe of   7 days but client requirement is change to 90  days .I checked  the badi  
       BADI : BBP_CHANGE_DEFAULT
      Method: IF_EX_BBP_CHANGE_DEFAULT~CHANGE_DEFAULT_DELIV_Date.
      but it only triggering for Confirm Goods and Services but i need for Check Status.
       can any one sugest the solution for this.
    Please hlep.
    Thanks in Advance
    Channappa Sajjanar

    Hi,
    The 7 days is default in SAP code, we have to enhance the code in the include LBBP_SC_UI_ITSF48 where we coded as follow:
    READ TABLE et_control_list WITH KEY field_name = 'SELECTION_DATE'.
    IF sy-subrc = 0.
    et_control_list-display_flag = gc_yes.
    IF iv_change = gc_yes.
    et_control_list-field_content = '5'.
    ENDIF.
    MODIFY et_control_list INDEX sy-tabix.
    ENDIF.
    This will work

  • Continual Value Change Twice a Day

    I am getting the following value change twice a day at approx 11am and 7pm everyday since the fix, tried a reset after the fix was applied but it is still happening everyday, is this normal.
    11:16:05, 01 Mar. (432666.450000) CWMP: session completed successfully
    11:16:04, 01 Mar. (432665.930000) CWMP: HTTP authentication success from https://pbthdm.bt.mo
    11:16:01, 01 Mar. (432662.590000) CWMP: Server URL: https://pbthdm.bt.mo; Connecting as user: ACS username
    11:16:01, 01 Mar. (432662.580000) CWMP: Session start now. Event code(s): '4 VALUE CHANGE'
    11:16:00, 01 Mar. (432662.190000) CWMP: Initializing transaction for event code 4 VALUE CHANGE
    Also, since the original firmware update .204 I am getting the lan reset (but no boot or orange light reset) every end of third day of been up before and after fix, is this normal. Further since the firmware update my speed has gone down to around 34 Mbps from around 38Mbps, is this due to dlm because of the resets which I mentioned in a previous post and is it likely to go back up. Have a brand new HG612 3B OR modem given to me by the engineer at time of installation as a backup, would this get rid of the dlm.
    These are my stats (minus serial no):
    1. Product name: BT Home Hub
    2. Serial number: xxxxxxxxxxxxxxxxxxxxxxxx
    3. Firmware version: Software version 4.7.5.1.83.8.204 (Type A) Last updated 23/01/15
    4. Board version: BT Hub 5A
    5. DSL uptime: 2 days, 18:07:59
    6. Data rate: 9230 / 34219
    7. Maximum data rate: 9182 / 40362
    8. Noise margin: 6.2 / 6.5
    9. Line attenuation: 36.8 / 23.5
    10. Signal attenuation: 36.3 / 22.0
    Bt Wholesale Broadband Checker:
    FTTC Range A (Clean) 46.1 33.1 10 6.6 -- Available
    FTTC Range B (Impacted) 39 22.4 10 4.8 -- Available
    WBC ADSL 2+ Up to 5.5 -- 3 to 8 Available
    WBC ADSL 2+ Annex M Up to 5.5 Up to 1 3 to 8 Available
    ADSL Max Up to 4 -- 3 to 7 Available
    WBC Fixed Rate 2 -- -- Available
    Fixed Rate 2 -- -- Available
    Thanking you for any help in advance.

    Call bt up on 08001114567 and ask them to do a test on your line if it comes back clear then it's more than likely your homehub, if they say it's your line then they will send an engineer out, if the problem is within your home you will be charged £130, but bt will tell you all the details .

  • My host name changes every few days, since Xmas adding a macbook its changed 6 times. Do I need to stop this? Does it cause problems with sharing between the iMac and macbook?

    my host name changes every few days, since Xmas adding a macbook its changed 6 times. Do I need to stop this? Does it cause problems with sharing between the iMac and macbook?

    There are several possible causes for this problem.
    1. Two (or more) computers on the local network have the same Bonjour name, such as "X's-MacBook-Pro.local".
    2. You have two simultaneous connections to the same local network: probably Ethernet and Wi-Fi. If applicable, disconnect the Ethernet cable or turn off Wi-Fi.
    3. A Mac wakes from sleep due to network traffic. This is due to a bug in OS X that may only affect some models.
    4. A device that gets its network address from the router wakes from sleep, and the address it was using before has been assigned to another device.
    5. A third-party wireless router has incompatible settings or firmware. In that case, refer to the manufacturer or ISP for support. Restarting the router may help, temporarily.
    6. See also this support article.
    Rename the computer in the Sharing preference pane.

  • SQL Query Help/ Converts seconds to day:hr:mi:se

    I have query that returns value in seconds. How i will convert those seconds in DAY:HOUR:MIN:SEC in the same query? What will be the mathematical formulae or alogorithim for this?
    Thanks
    Munis Warsi
    null

    Seriously, you post 750+ lines of unformatted SQL statement and a completely unreadable and unformatted explain plan and you expect people to be able to help with that?
    From what I can see it looks like some sort of query against an Oracle APPS database, and there are numerous calls to PL/SQL functions in there, so you're creating a multitude of context switches between the SQL and PL engines... that's known to cause performance problems.
    Take a read of the discussions linked in the FAQ: Re: 3. How to  improve the performance of my query? / My query is running slow.
    And also consider if your question would be better asked in the Oracle Apps forum space instead.

  • How can I change the start day of the week for weekly view?

    How can I change the start day of the week for weekly view?
    <P>
    This function is configured in the code in file <loadpoint>/CalendarServer/cal/uicust/en/main.html:
    <P>
    i18n['def first day'] = '1';
    <P>
    Note: 0 is Sunday, 1 is Monday, etc.

    Click system perferences below ur screen then click language&text and you just select ur peference langauge

  • Changing calender work days without phone numerals

    I work in saudi arabia. I just bought my iphone and inorder to change the work days on my calender i had to change the region format under international, but doing so changed all the numerals into arabic format which is hard for me to read. is there a way i can keep the work days as saturday to wednesday while holding the numberal to english.
    Please help me i do not want to chose one of two cuz life is much harder that way.

    After speaking with numerous CSR's and being told a technician would have to come out next week, our problem is resolved.  Someone from the Network Team looked at the network configuration and found an issue.  He corrected this issue and we can now successfully make and receive calls.  He also made a note in case the issue happens again.
    By the way, I discovered the Automatic Call Forwarding feature with digital voice.  I set this up, and all calls were automatically forwarded to my cell phone while our phone service was down; once our phones came back up this shut off automatically.  It's a great feature but I wish one of the CSR's would have mentioned it.
    Thanks for your assistance.

  • HT5035 I redeemed a code, bought some songs had a balance of $8 and change. Few days later bought another song and it debited it from my bank account? Why? how do I fix it to take it from my itunes balance?

    I bought my first itunes redeemable card ($15). Redeemed the code. Bought a few songs (had a balance of $8 and some change). Few days later went to buy another song and it charged my bank debit card (that I HAD to enter). Since it debited it out of my bank I haven;t purchased anthing else untilI know what's going on and now I have a $6 and somechange balance? What am I doing wrong or is it itunes? How do I maked it where it will take it off by itunes balance and not what seems to be from both?

    Where did you buy this laptop?  I know if I opened a box expecing and having paid for a 2012 model and found a 2010 model, I'd be back at the store demanding an exchange quicker than you could imagine.  Open box or not, if you thought you were buying a 2012 model, you should get what you paid for.

  • Is there a way to change the start day for the week?

    So I really like the "Insert Categories from the following" functionality of the Reorganize tool, and I fell in love with it's ability to break down by date automagically. I've encountered one problem with my use of it, though: I start my "work week" on Sunday, and it defaults to Monday as the first day of a week without any seeming way to change it to Sunday. Is there a way to do this?

    Hi Christopher,
    The WEEKDAY function allows specifying either Sunday or Monday as the first day of the week:
    WEEKDAY
    The WEEKDAY function returns a number that is the day of the week for a given date. WEEKDAY(date, first-day)
      date:  The date the function should use. date is a date/time value. The time portion is ignored by this function.
      first-day: An optional value that specifies how days are numbered.
    Sunday is 1 (1 or omitted):  Sunday is the first day (day 1) of the week and Saturday is day 7.
    Monday is 1 (2):  Monday is the first day (day 1) of the week and Sunday is day 7. Monday is 0 (3):  Monday is the first day (day 0) of the week and Sunday is day 6.
    But I think you are referring to the first day of the 'workweek', for which I do not see a means of defining a custom value.
    Since you want to 'insert categories', though, you could easily define your own, using WEEKDAY(date) or WEEKDAY(date,1), plus an IF statement to return the category label appropriate to the day. Here's one for a Sunday to Thursday work week. Dates are in column A, the formula is in whichever column you want as the Category column. For the example, I've placed it in column B.
    B2, and filled down: =IF(WEEKDAY(A)<6,"Work","Off")
    The top table shows the weekday numbers returned for each day of the week for each of the three permitted values for the optional second argument. The bottom table shows the results from the formula above, used to define a category label for each date:
    A10 was left blank intentionally, to determine if the lack of data resulted in an error. The Warning message, flagged by the blue 'warning' triangle, is "The formula uses a number in place of a date." The 'date' assigned to this numerical value of zero was a Friday, but I'm not certain when. Probably best to avoid extra rows with no date shown.
    Regards,
    Barry

  • How to change second birthday entry in contacts to be english

    I recently noticed that when I attempt to "add" a second birthday entry into my contacts the date options come up in Chinese.  If I attempt to change it by clicking on chinese, the only options available are chinese, hebrew and islamic.  This does not occur on the first entry of a birthday.  The first "add birthday" works as desired given you the month,day, year as you would expect when language is set to English.  This occurs regardless of adding a new contact or modifying a current contact.  I verified that in "general, settings, mail, contacts, calendars, alternate calendars was indeed "off".  I did try toggling off to chinese to off again in the alternate calendars option.  I do not believe this was a problem before version 8 as I do not believe you could put in a second birthday.  Based on other contacts, I used "other" for the date.
    Any information related to this would be helpful.
    This occurs on:
    Iphone 5s
    version 8.1.2 (12b440)
    model me309ll/a
    Thanks,

    If you want to clear the value of the second column in the user interface through a ValueChangeListener, do the following:
    1) Use similar code in your page:
    <af:table ...>
      <af:column id="col1" ... >
        <af:inputText id="myFirstAttr" autoSubmit="true"
                      valueChangeListener="#{MyBean.myFirstAttrValueChanged}"
                      ... >
          <f:validator ... />
        </af:inputText>
      </af:column>
      <af:column id="col2" ... >
        <af:inputText id="mySecondAttr" partialTriggers="myFirstAttr"
                      binding="#{MyBean.mySecondAttr}"
                      ... >
          <f:validator ... />
        </af:inputText>
      </af:column>
    </af:table>2) Use an existing managed bean or create a new one and bind it to the name "MyBean". The code should be similar to:
    public class MyBean
      private RichInputText mySecondAttr;
      public SurveyBean()
      public void mySecondAttrValueChanged(ValueChangeEvent valueChangeEvent) {
        // Clear the value of the 2nd column depending on the new value entered in the 1st column
        // (Use valueChangeEvent.getNewValue() to get the new value of the 1st column)
        if (<some_condition>) {
          mySecondAttr.setValue(null);
      public void setMySecondAttr(RichInputText mySecondAttr) {
        this.mySecondAttr = mySecondAttr;
      public RichInputText getMySecondAttr() {
        return mySecondAttr;
    }

  • Job to retrieve difference in seconds (sometimes days)

    Hi, good day everyone.
    I managed (with your help btw) to get the difference (in seconds for each time an UTR 'NAME' fails and return) with a job which runs every time at morning for the last day (sysdate -1), the problem is that I need to retrieve the data when the time is null (when the UTR didn't return that day), here's an example:
    CREATE TABLE     evtmsg
    (       evt_date             DATE,
         message          VARCHAR2 (50)
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('04/10/2010 8:39:05', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MCD-1 fail');*
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('04/10/2010 8:39:05', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MAD-1 fail');*
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('04/10/2010 8:39:08', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MCD-1 return');*
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('04/10/2010 8:39:50', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02ZPD-1 fail');*
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('04/10/2010 8:39:50', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MAD-1 return');*
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('05/10/2010 5:40:22', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MCD-1 fail');
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('05/10/2010 8:38:50', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02ZPD-1 return');In this case, if today was 5th (after running the job in the morning (01:00:00 a.m)), I'd have the next outcome:
    Select * from qtyuna;
    04/10/2010 8:39:05     04/10/2010 8:39:08   UTR 02MCD-1    3
    04/10/2010 8:39:05     04/10/2010 8:39:50   UTR 02MAD-1    45
    04/10/2010 8:39:50     null                           UTR 02ZPD-1    nullAnd if I do the same query on 6th (after the job) I'd like to get this:
    Select * from qtyuna;
    04/10/2010 8:39:05     04/10/2010 8:39:08   UTR 02MCD-1    3
    04/10/2010 8:39:05     04/10/2010 8:39:50   UTR 02MAD-1    45
    04/10/2010 8:39:50     05/10/2010 8:39:55   UTR 02ZPD-1     86405
    05/10/2010 5:40:22     null                           UTR 02MCD-1    nullThe job I have is this
    INSERT INTO qtyuna (datefa, datere, rtunam, timefa)
                    SELECT evt_date_fallo, evt_date_retorno, id, TO_CHAR(TO_CHAR(evt_date_retorno, 'SSSSS') - TO_CHAR(evt_date_fallo, 'SSSSS'))seconds,
                    FROM    (SELECT evt_date evt_date_fallo,
                    LEAD(evt_date) OVER (partition by id ORDER BY id||TO_CHAR(evt_date, 'yyyymmddhh24miss')||CASE status WHEN 'return' THEN 1 ELSE 2 END) evt_date_retorno,
                    id,
                    status
                      FROM  (SELECT evt_date,
                          SUBSTR(message, 1, 11) id,
                          SUBSTR(message, 13) status
                          FROM   [email protected]
                          WHERE  message LIKE 'UTR%'
                          AND    categ = 1
                          AND    TRUNC(evt_date) = TRUNC(SYSDATE - 1)))
                      WHERE    status like '%fail%'
                      ORDER BY evt_date_fallo;I don't know if I need another job to do that... if so, could you tell me how?
    Regards

    Hi,
    It looks like the main problem is how you are computing the seconds column.
    In Oracle, if you subtract one date from another, you get the difference in units of 1 day. If you want the difference in seconds, multiply the difference in days by the number of seconds in one day. There's no need to use TO_CHAR, and nothing special has to be done if the DATEs are on different calendar days.
    In your case, once you have the two DATEs identified, the way to get the number of seconds between them is:
    (evt_date_retorno - evt_date_fallo) * 24 * 60 * 60because each day has 24 hours, each hour has 60 minutes, and each minute has 60 seconds.
    There are lots of other things you could change. In particular, the way you are using LEAD is very confusing. If you are using Oracle 10 or higher, then I suggest using FIRST_VALUE instead, like this:
    DEFINE     TEST_SYSDATE     = "(DATE '2010-10-05' + (1 / 24))"
    -- INSERT INTO qtyuna (datefa, datere, rtunam, timefa)     -- Removed for testing
    WITH    got_evt_date_retorno     AS
         SELECT  evt_date               AS evt_date_fallo
         ,     LAST_VALUE ( CASE
                                WHEN  SUBSTR (message, 13) = 'return'
                           THEN  evt_date
                        END
                          IGNORE NULLS
                      ) OVER ( PARTITION BY  SUBSTR (message, 1, 11)
                                   ORDER BY       evt_date          DESC
                          )             AS evt_date_retorno
         ,       SUBSTR (message, 1, 11)            AS id
         ,     SUBSTR (message, 13)            AS status
         FROM     evtmsg
         WHERE     SUBSTR (message, 1, 3)     = 'UTR'               -- More efficient than LIKE
    --     AND     categ                     = 1               -- There's no categ in the sample data
         AND     evt_date          < TRUNC (&test_sysdate)     -- Use SYSDATE in Production
    SELECT       evt_date_fallo
    ,       evt_date_retorno
    ,       id
    ,       (evt_date_retorno - evt_date_fallo) * 24 * 60 * 60     AS seconds
    FROM       got_evt_date_retorno
    WHERE       SUBSTR (status, -4)     = 'fail'               -- Do we need SUBSTR here?
    -- ORDER BY  evt_date_fallo                         -- For testing only
    ;You wrote this with a separate sub-query to get id and status from message. That's not a bad idea; you could add another sub-query above.
    I changed SYSDATE to a substritution variable for testing. After you're through with testing, change &test_stsdate to SYSDATE.

  • Why do my events change in the day view, when I create a new event? (iCal for iPad 2)

    Every time I create a new event in the day view in iCal on iPad, the other events (which I created before for the same day) change their starting and/or their ending time.
    Please help!

    monkeyde,
    You are getting entagled in the two confusing meanings of the term pixels, namely as a unit identical to points and equalling 1/72 inch, and the basic component of raster images (and effects).
    You can read on in this very recent thread:
    Is there a way to get Illustrator to know how many pixels are in an inch?

  • Changing the first day-of-the-week on the MyTimesheets app

    IN the SAP ECC and Portal implementations of the timesheet app, we were recently able to change the display so the first day of the week is listed as Monday, rather than Sunday. I would like to do the same thing with Fiori.
    That is, when the app starts up the first view a calendar view of the whole month. If a person wants to enter time manually, they click the button labeled "manual" and a data entry screen pops up. The first day of the week listed across the top is Sunday, which does not reflect our settings in ECC. We need the 1st day of the week to be Monday.
    Is there a configuration change we can make to force the 1st day of the week to be Monday, as it is in ECC?
    thanks for your help!
    -Rob Solomon

    Hi Rob,
    Are you using Wave2 app? You could change the setting for first day of the week in CAC1 and Fiori Timesheet app will adjust te calendar accordingly.
    Nothing needs to be done for Fiori app.
    Please update UIX01HCM to SP03 if you are using Wave2 app?
    Best Regards
    Pankaj

Maybe you are looking for

  • Lenovo 3000 N200 0769-ALU Dual Monitor Support

    My nephew has a Lenovo 3000 N200 0769-ALU, downgraded from Vista to XP.  Does this notebook support Dual Monitor Extended Desktop configuration?  If so, how is this configured? My nephew lives in a different city, so I am not able to just go over and

  • Simple shape morphing in Keynote...?

    Hello, I am seeking help with what should be a simple task (I reckon), but which is turning out not to be... I use Keynote 9 for my teaching presentations. I need to show semi-transparent coloured regions – superimposed onto maps – that change throug

  • I need some piece of advice

    Hello everybody Well, I got a question, which is more a "good way of programming" question than a technical question. I'm making an application which needs to connect to a server, so first I have a JPanel where there is some JTtextField and JPassword

  • Problem saving as/overwriting eps

    hi to all! i have a problem saving/overwriting existent .tiff files into eps file... My script is like this... Myfolder = Folder.selectDialog("Select files").getFiles(); outputfolder = new Folder(decodeURI(Myfolder.fsName)); // directory must be the

  • Can't connect to Ovi Suite 2.2.0.245

    I've got a problem. And that is that Ovi Suite can't seem to recognize my X3-00. I can access the phone via "My Computer => Portable Devices => Nokia(the phone's name)", which means that it can''t be the USB-cable Does anyone know a solution for this