+ Reply to Thread
Results 1 to 17 of 17

Time Difference between two date format

  1. #1
    Registered User
    Join Date
    07-08-2013
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    7

    Time Difference between two date format

    Hello,

    Whenever i try want to calculate the time difference between a [Date Time] on/before 12th of every month to [Date Time] on/after 13th of every month gives error value. The actual issue is of the Date format.
    For Example :

    Cell A1 = 07-12-2014 12:12:08 -------> 12th July 2014
    Cell B1 = 07/13/2014 13:04:13 --------> 13th July 2014
    Cell C1 = B1 - A1 ---------------------> gives "#Value!"

    Require output in HH:MM:SS format.
    I have to replace manually the date format from either "-" to "/" or "/" to "-"

    Kindly help..

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Time Difference between two date format

    http://www.excelforum.com/the-water-...-question.html
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    07-08-2013
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Time Difference between two date format

    Dear oeldere,

    As requested....
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Time Difference between two date format

    D3=
    Please Login or Register  to view this content.
    And format as value

  5. #5
    Registered User
    Join Date
    07-08-2013
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Time Difference between two date format

    Dear oeldere,

    "format as value" --
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Time Difference between two date format


  7. #7
    Registered User
    Join Date
    07-08-2013
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Time Difference between two date format

    Dear oeldere,

    You have manually changed the format of the date in Cell A2 and Cell B2. In such cases i will have change the dates in all the cells to same format to take the time difference.(Find and Replace--- Ctrl+k) to do the changes...
    In the first post also i have mentioned "The actual issue is of the Date format."
    Any easier method..

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Time Difference between two date format

    Why do you use the format mm/dd/yyyy instead of dd/mm/yyyy?

  9. #9
    Registered User
    Join Date
    07-08-2013
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Time Difference between two date format

    the reports that i get has different formats of dates...
    The format of dates changes after 12th for every month...
    On / Before 12th the format is MM-DD-YYYY and
    On / After 13th the format changes to M/DD/YYYY.

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Time Difference between two date format

    Please Login or Register  to view this content.
    And why is that?
    What is the use for that?

    Why not change the problem at the bottom => in your Original data.

    Then you are able to use my formula.

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Time Difference between two date format

    that doesnt seem correct
    are you sure its not that the formats are all mdy
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  12. #12
    Registered User
    Join Date
    07-08-2013
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Time Difference between two date format

    It is not possible for me change the format at multiple places of the my multiple servers.
    The dates before 12th coincedes with month's of the year. check out using filters on the excels provided.
    The format is surely in mdy on both days..

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Time Difference between two date format

    i think the trouble is that excel is changing those it recognises as a date according to your regional settings to a date the others it is leaving as text,
    if i copy
    01/13/2014
    01/12/2014
    into excel i get
    01/13/2014 as text as there is no month 13
    01/12/2014 as a date 1 dec 2014
    Last edited by martindwilson; 07-19-2014 at 08:12 AM.

  14. #14
    Registered User
    Join Date
    07-08-2013
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Time Difference between two date format

    So what changes in settings are needed in my regional world?
    Any solution to the 12days of phobias I face every month. As they are the minor part compared to rest of the month.
    Thanks in advance.

  15. #15
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Time Difference between two date format

    If you can't change the data on the beginning, you can use a helpcolum to make the new setting in dd-mm-jjjj.

    after that you can use my formula.

  16. #16
    Forum Contributor
    Join Date
    08-11-2012
    Location
    bengalur
    MS-Off Ver
    Excel 2003, 2007
    Posts
    152

    Re: Time Difference between two date format

    You can write the formula in this way = Time(B1-C1)

  17. #17
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Time Difference between two date format

    id just change my settings in region in windows options to match whatever format the original is in
    import the data into excel
    then change back afterwards

+ 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. [SOLVED] Time in Time format and text foramt - Finding the Hours difference
    By thilag in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-19-2013, 07:14 AM
  2. Date format and difference in time
    By tampatim in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2013, 04:12 PM
  3. Calculation of time difference between the Start date & time & End Date & time
    By Harry Jones in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-17-2012, 03:54 PM
  4. [SOLVED] Caculating the Time difference from Start & end date/time excludin weekends & non ofce hrs
    By Harry Jones in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-08-2012, 06:25 AM
  5. [SOLVED] Subtract date/time from data/time and get difference in minutes
    By zit1343 in forum Excel General
    Replies: 2
    Last Post: 06-18-2012, 11:23 AM

Tags for this Thread

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