+ Reply to Thread
Results 1 to 4 of 4

adding and subtracting date and time

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Baltimore
    MS-Off Ver
    2010
    Posts
    31

    adding and subtracting date and time

    Hi all and thanks for your help in advance.

    I am working on a dataset involving work orders. Each row represents a unique work order and in separate columns I have work order start date, work order start time, work order end date and work order end time. I was able to combine columns so now I have two columns (rather than four) which shows work order start date and time and work order end date and time.

    My problem lies in that I am now trying to calculate the time it took complete each work order. So if a work order opened cell reads 1/1/1412:00am and the closed cell reads 1/2/1412:00am it will give me 24hrs. Is there a solution to this? I feel like I may not have needed to combine the date and time columns, but I am out of ideas at this point.

    Again, any suggestions are appreciated. Thanks!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: adding and subtracting date and time

    Look at this:

    Data Range
    A
    B
    1
    1/1/2014 0:00
    Input as 1/1/2014 12:00:00 AM
    2
    1/2/2014 0:00
    3
    24:00
    Format Custom [h]:mm
    4
    Cell A3 =A2-A1
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    Baltimore
    MS-Off Ver
    2010
    Posts
    31

    Re: adding and subtracting date and time

    This looks to be a promising start, but I may have incorrectly combined my cells. I used the following formula to combine: =TEXT(G4,"MM/DD/YY") & TEXT(H4,"hh:mm")

    Did I do that right? Because when I combine, there is no space separating the date and time.

  4. #4
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: adding and subtracting date and time

    To add a space, simply include this in between the date and time:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Adding/Subtracting military time
    By criticalmass in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-20-2013, 03:38 PM
  2. IF functions when adding and subtracting time
    By allan223 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-11-2012, 11:09 PM
  3. Adding/Subtracting Time Help...
    By killertofu in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-15-2006, 04:49 PM
  4. adding/subtracting time
    By [email protected] in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-11-2006, 10:50 AM
  5. adding & Subtracting date & time in VBA
    By jasonsweeney in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-11-2005, 12:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1