+ Reply to Thread
Results 1 to 2 of 2

How to get days in decimal from two timestamps

  1. #1
    Registered User
    Join Date
    02-18-2019
    Location
    Ireland
    MS-Off Ver
    2017
    Posts
    13

    How to get days in decimal from two timestamps

    Hi,

    how can I get days in decimal format in attached example (cell C2)? There is also an example on the right (cell G2) on how the result should be.

    Thank you in advance!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    12,342

    Re: How to get days in decimal from two timestamps

    The date/time stamps in columns A and B are text strings, not real dates. Convert these to real dates, and your subtraction formula should work just fine. Some strategies for converting numbers (and dates) stored as text to numbers: https://support.microsoft.com/en-us/...rs=en-us&ad=us

    I used the Text to columns feature, removed the time zone indicator, and Excel correctly interpreted the date/time stamp, and then the formula in column C works just fine.
    1) Select A2 -> Text to columns -> Fixed width.
    2) Add/Delete breaks so that the date/time stamp is in one column and the time zone is in its own column.
    3) Tell Excel to skip importing the time zone column -> Finish.

    Repeat for B2. If you need to retain the time zone information, have the text wizard output the columns into helper columns somewhere off to the right.

    Will something like that work for you?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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] How to count # of days between 2 timestamps
    By JaneMRO in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-07-2020, 06:24 AM
  2. [SOLVED] A number of days into weeks and days-How do you convert the decimal part of 0.571429
    By Robert Christie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-25-2020, 09:37 PM
  3. Replies: 1
    Last Post: 03-24-2016, 08:21 AM
  4. [SOLVED] Convert Days Hours and Minutes to decimal days
    By david1987 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-06-2015, 05:44 PM
  5. Convert days in decimal to days:hours:minutes
    By Todd F. in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-16-2006, 03:25 PM
  6. Convert decimal days to Days,hours, minutes
    By Todd F. in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2006, 11:45 AM
  7. Decimal days
    By cliffbellis766@ in forum Excel General
    Replies: 4
    Last Post: 01-02-2006, 09:34 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