I subtract two dates and have total seconds. How to convert seconds to.....

days/hours/minutes/seconds.
Does anyone know how to convert a # that equals total seconds to days/hours/minutes/seconds??
Thanks as always
Adam

i guess you can mod the number with 360 first and get the number of days, then get the remainder and mode by 60 get the hour and so forth, maybe a better way is using recursive function to return you a final result. Hopefully this will help, don't complain on me if I am misleading you since this is my first time try to help.

Similar Messages

  • I haven't used my rescue email in 5 years and have totally forgotten how

    I can't remember the Apple ID security questions and with my attempts of answering them I have been locked out! With all help going to the email I can't access.

    Thanks I have tried rings apple support and it keeps refering me to the Apple website and can't get answers.
    I don't remember the answers to the questions to change the rescue email and can't access the rescue email as it has been 5 years since I used that email acocunt and don't remember the passwords on it.

  • Subtract   two dates to get   months and days

    I havew to subtract two dates and get the differnce ,
              Date issuedDate= myobj.getIssueDate();
              Date expirationDate=DateUtils.addMonths(issuedDate, 6);
              long timeDiff=expirationDate.getTime()-new Date().getTime();
              long daysRemaning=timeDiff/86400000;this is code I get the number of days between the issue date and todays date.now my client wants not just days but months and days , i need suggestions on how to get days and months between any two given dates

    I have read that it is best to use java.util.Calendar for almost any time related issue.
    With some switch statements and a for loop, I think the Calendar class could solve the problem.

  • Substacting two dates and get result in months

    Hi Friends
    I have to subtract two dates and get the difference in months. Here's the sample data:
    select DATE '2009-10-01' Date_value, 111 Cust_id,  DATE '2009-10-22' Open_date from dual
    union all
    select DATE '2009-10-01', 112 , DATE '2009-10-15' from dual
    union all
    select DATE '2009-10-01', 113 , DATE '2009-10-5' from dual
    union all
    select DATE '2009-11-01', 111 , DATE '2009-10-22' from dual
    union all
    select DATE '2009-11-01', 112 ,DATE '2009-10-15' from dual
    union all
    select DATE '2009-11-01', 113 ,DATE '2009-10-22'  from dualAnd here’s my query to get the difference in month:
    SELECT cust_id, date_value, open_date,
           ROUND (ABS (date_value - open_date) / 365 * 12) diff_in_months
      FROM tBut the output is unexpected:
    CUST_ID     DATE_VALUE     OPEN_DATE     DIFF_IN_MONTHS
    111     1/10/2009     22/10/2009     1
    112     1/10/2009     15/10/2009     0
    113     1/10/2009     5/10/2009     0
    111     1/11/2009     22/10/2009     0
    112     1/11/2009     15/10/2009     1
    113     1/11/2009     22/10/2009     0Ideally, the output should be as per the following:
    CUST_ID     DATE_VALUE     OPEN_DATE     DIFF_IN_MONTHS
    111     1/10/2009     22/10/2009     0
    112     1/10/2009     15/10/2009     0
    113     1/10/2009     5/10/2009     0
    111     1/11/2009     22/10/2009     1
    112     1/11/2009     15/10/2009     1
    113     1/11/2009     22/10/2009     1What is wrong in my query?

    Hi Centinul
    Found the resolution. When I use the following query, I get the perfect result:
    SELECT cust_id, date_value, open_date,
           ROUND (ABS (MONTHS_BETWEEN (open_date, date_value))) months,
           ROUND (ABS (date_value - open_date) / 365 * 12) diff_in_months,
           MONTHS_BETWEEN (date_value,ADD_MONTHS (LAST_DAY (open_date), -1) + 1 ) final_val
      FROM tAnd here's the output of all three columns:
    CUST_ID     DATE_VALUE     OPEN_DATE     MONTHS     DIFF_IN_MONTHS     FINAL_VAL
    111     1/10/2009     22/10/2009     1     1     0
    112     1/10/2009     15/10/2009     0     0     0
    113     1/10/2009     5/10/2009     0     0     0
    111     1/11/2009     22/10/2009     0     0     1
    112     1/11/2009     15/10/2009     1     1     1
    113     1/11/2009     22/10/2009     0     0     1

  • Unable to install Adobe Photoshop Elements 13, from disc. The disc is rejected in DVD RW drive, no dialogue box comes up. The  DVD driver is up to date and have updated flash player.

    Unable to install Adobe Photoshop Elements 13, from disc. The disc is rejected in DVD RW drive, no dialogue box comes up. The DVD driver is up to date and have updated flash player.

    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 | 12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7
    Lightroom:  5.7.1| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Get number of hours between two dates and two hours using factory calendar

    Hello all,
    I have the following requirement: I need to calculate the number of hours between two dates and two hours (start date- finish date and start hour-finish hour) or timestamps using a factory calendar. I must program it on CRM environment.
    Does anybody know a function module that makes it?
    Thanks in advance.
    Carmen

    Please check function module DURATION_DETERMINE.
    - April King

  • Technical question:  Is it possible to work on the same Lightroom catalog across two computers and have the catalog sync? If so, how??

    Technical question:
    Is it possible to work on the same Lightroom catalog across two computers and have the catalog sync? If so, how??
    Here's a little more information on what I am trying to do.
    I have a desktop computer with 4tb worth of pictures that has Lightroom and Photoshop on it. I also have a laptop with Photoshop and Lightroom. I would like to be able to edit those same pictures with their current edits that are currently on my desktop on my laptop. If this can be done, I'm sure I need to be on the same wifi network for my laptop to be able to access my desktop's photo library. I am technically savvy enough to map a network drive, but how do I get my two Lightroom catalogs to sync when I make a change on one of my computers? Would i be working only on one catalog? Or two separate catalogs that would need to be manually synced to the other computer? Would it be beneficial to put my lightroom catalog on something like dropbox?
    I'd appreciate any information or tutorials if someone knows how to do this.

    I do this by having my LR catalog and photos on an external drive that I swap between the two computers.  I am on Windows and have the same drive letter assigned to the drive on both computers.
    Because the photos are on a portable drive I back up the portable drive to another hard-drive every night or after important work, because portable drives are susceptible to damage or loss.

  • I have an Iphone 4S and I would like to print my text messages, including the thread and the Imessage date and time stamps.  How would I do this?

    I have an Iphone 4S and I would like to print my text messages, including the thread and the Imessage date and time stamps.  How would I do this?

    settings - message - imessage - OFF

  • I now have two iPads and have opened a new icloud account.  I need to change one of the ipads to the new account.  Can you tell me how to do that?

    I now have two iPads and have opened a new icloud account.  I need to change one of the ipads to the new account.  Can you tell me how to do that?

    Welcome to the Apple Community.
    settings > iCloud, scroll down and delete account. Re-enter the details of the new account.

  • HT1923 Hi, I have a iPod touch 4th generation and I does not show in iTunes. It comes up as charging when it is plugged into the computer but just not in iTunes. I have everything up to date and have restarted both computer and iPod. Help please?

    Hi, I have a iPod touch 4th generation. It comes up as charging when it is plugged into the computer but it does not show in iTunes. I have everything up to date and have restarted both computer and iPod. Help please?

    Try here  >   - http://support.apple.com/kb/TS1369.

  • How can I make biscuit and then break it to two parts and have some small pieces?

    Hello there,
    please tell me ..
    How can I make biscuit in AE and then break it to two parts and have some small pieces fall down ?
    any help would be so much appreciated ..

    Strictly inside AE you have two options. Shatter using custom shatter maps and masking + particle effects. Neither would be as conviceing as Dave's solution.
    If you have access to a 3D app (blender is free) you can do it there.
    Here's a 2 minute project in AE with a stock image:
    with a shot of the broken buscuit top animated to fit the split it might be kind of convincing.
    Here's the CS6 AEP project file for you to play with. Take a look at all of the elements to see how this worked by selecting all layers and then pressing the u key twice to see everything I changed.

  • Help I am a student and have no idea how to sort this program by Product

    First class:
    // CheckPoint: Inventory Program Part 1
    // Display product information
    public class Product1 //declare class
    //declare instance variables
    private int productNumber,
    inStock;
    private String productName; // List of instance variables unique to object
    private double unitPrice;
    //constructor to handle no input and set defaults
    public Product1()
    //constructor to handle input parameters
    public Product1( int number, String name, int stock, double perPrice )
    productNumber = number;
    productName = name;
    inStock = stock;
    unitPrice = perPrice;
    public void setProductNumber( int number ) //stores product number
    productNumber = number;
    public void setProductName( String name ) //stores product name
    productName = name;
    public void setInStock( int stock ) //stores amount of product in stock
    inStock = stock;
    public void setUnitPrice( double perPrice ) //stores the unit price of product
    unitPrice = perPrice;
    public int getProductNumber() //allows a call to retrieve product number
    return productNumber;
    public String getProductName() //allows a call to retrieve the product name
    return productName;
    public int getInStock() //allows a call to retrieve stock info
    return inStock;
    public double getUnitPrice() //allows a call to retrieve unit price
    return unitPrice;
    public double getInventoryValue()
    return ( (double)inStock * unitPrice );
    public String toString()
    return productName + " - " + unitPrice;
    Second Class:
    import java.text.DecimalFormat;
    public class Inventory1
    private final int maxInventory = 30;
    private Product1 items[] = new Product1[ maxInventory ];
    DecimalFormat formatter = new DecimalFormat( "$##,###.00" );
    public void addProduct( Product1 item )
    for ( int i = 0; i < maxInventory; i++ )
    if (items[i] == null)
    items[i] = item;
    return;
    public double getTotalInventoryValue()
    double sum = 0.0;
    for ( Product1 item : items )
    if ( item != null )
    sum += item.getInventoryValue();
    return sum;
    public void displayInventory()
    boolean hasItems = false;
    for ( Product1 item : items )
    if ( item != null)
    hasItems = true;
    System.out.printf( "%8d%12s%11d%13.2f%14.2f", item.getProductNumber() , item.getProductName(), item.getInStock(), item.getUnitPrice(), item.getInventoryValue() );
    System.out.println( "" ); // display space
    System.out.println("");
    Part 3:
    import java.text.DecimalFormat;
    public class InventoryTest1
    static DecimalFormat formatter = new DecimalFormat( "$##,###.00" );
    public static void main( String args[] )
    Product1 item1 = new Product1( 001, "Staples", 5, 2.99 );
    Product1 item2 = new Product1( 002, "Books", 10, 15.00 );
    Product1 item3 = new Product1( 003, "Printers", 20, 55.00 );
    Inventory1 myInventory1 = new Inventory1();
    System.out.println("");
    System.out.printf( "%s%12s%11s%13s%14s", "Product#", "Name", "In Stock", "Unit Price", "Stock Value" );
    System.out.println("");
    System.out.println("");
    myInventory1.displayInventory();
    myInventory1.addProduct( item1 );
    myInventory1.addProduct( item2 );
    myInventory1.addProduct( item3 );
    myInventory1.displayInventory();
    System.out.println( "" ); // display space
    System.out.println("");
    System.out.println( "Total value of inventory is: " );
    System.out.println ( formatter.format(myInventory1.getTotalInventoryValue() ) );
    I have no idea where to put the sort statement and how to implement it.

    Sorry about that. Before i proceed with the code I will say that I need help trying to determine where to put a sort statement and what sort statement should I use. I have three classes and have no idea how to sort the items by Product name. For instance, I have staples, books, and printers in my code. How do I get it to display these names and all of the corresponding information in alphabetical order. So with that said, here is the code.
    First program:
    // CheckPoint: Inventory Program Part 1
    // Display product information
    public class Product1 //declare class
    //declare instance variables
    private int productNumber,
    inStock;
    private String productName; // List of instance variables unique to object
    private double unitPrice;
    //constructor to handle no input and set defaults
    public Product1()
    //constructor to handle input parameters
    public Product1( int number, String name, int stock, double perPrice )
    productNumber = number;
    productName = name;
    inStock = stock;
    unitPrice = perPrice;
    public void setProductNumber( int number ) //stores product number
    productNumber = number;
    public void setProductName( String name ) //stores product name
    productName = name;
    public void setInStock( int stock ) //stores amount of product in stock
    inStock = stock;
    public void setUnitPrice( double perPrice ) //stores the unit price of product
    unitPrice = perPrice;
    public int getProductNumber() //allows a call to retrieve product number
    return productNumber;
    public String getProductName() //allows a call to retrieve the product name
    return productName;
    public int getInStock() //allows a call to retrieve stock info
    return inStock;
    public double getUnitPrice() //allows a call to retrieve unit price
    return unitPrice;
    public double getInventoryValue()
    return ( (double)inStock * unitPrice );
    }

  • Hi.. I have a new apple computer and have no idea how to find stuff on here... Can someone tell me how to find my search history? Thanks

    Hi.. I have a new apple computer and have no idea how to find stuff on here... Can someone tell me how to find my search history? Thanks

    In addition to Japib's suggestion check out
    OS X Yosemite: See your files in the Finder
    OS X Yosemite: Finder preferences
    OS X Yosemite: Ways to quickly see and open items
    OS X Yosemite: Search with Spotlight
    OS X Yosemite: Rename files, folders, and disks
    OS X Yosemite: Folder basics
    OS X Yosemite: Ways to organize files on your desktop
    One more thing:
    Search history is a term generally referring to what sites you have visited via your browser (e.g. Safari)
    To see your Safari search history just open Safari and go to the top menu and select from Show History from the History
    See two pics below

  • I have an airport extreme base station and have no clue how to set up a private wireless network instead ton open one i have now.

    I have an airport extreme base station and have no clue how to change to a pawword type network from the network i have now that is free to the neighbor hood.

    Which version of the AirPort Utility are you using?

  • Ive paid my cc membership and have lightroom 5 how do I download and us photoshop cc

    ive paid my cc membership and have lightroom 5 how do I download and us photoshop cc

    Moving this discussion to the Creative Cloud Download & Install forum.
    Cwppix for information on how to install the Adobe Creative applications included with your membership please see Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html.

Maybe you are looking for

  • Need Help With Wireless Bridging

    Hello all, I have recently perchased high speed WiFi for my house so I could do some gaming on my Xbox. Problem is my roommate, who is a tech support professional, set the modem up in his bedroom, my Xbox is old and requires a wireless adapter to pic

  • Manual tax in billing

    Dear all, While creating sale order, as per my client's requirement, i had manually entered tax. But this manual entry doesnt have tax code.So while creating billing, it gives account determination error that is in account key MW3, gl account is miss

  • Oulokk Addin is not loading in Outlook 2013(office 365 pro plus)

    Hi, I have an outlook Addin developed by me. It is installed successfully and working fine in outllok2010 & outlook 2013 desktop clients. But i have an issue with Office 365 pro plus. I installed outlook2013 client using "Office365 Pro Plus". Outlook

  • IDVD won't open

    Hello, all. I need help again,please. I did something here that somehow screwed up Idvd. I went to Get Info of Quicktime player, Flip4mac and Idvd and changed Ownership & permissions to "read and write". Why?? 'cause I thought that It would solve a f

  • No audio on render, only buzzing sound.

    I managed to fix this problem before, possibly with the right codec download. but its back. It may be one of my codecs was a trial and stopped working, but i tried dling different codecs and no luck so far. Here is what my cs5.5 does: Queuing export