+ Reply to Thread
Results 1 to 4 of 4

Date format

  1. #1
    Registered User
    Join Date
    09-29-2018
    Location
    Windsor, ON
    MS-Off Ver
    2016
    Posts
    29

    Date format

    Hi, Everyone!

    I need your expertise with date format issues I am having.
    I download data from iPhone messages and paste into sheet “dump” where I use it to create one string of text. Then I copy it and paste it into sheet “Alarms”. What I am trying to accomplish is to extract a date that I can format into a usable date format so I can subtract to dates to get elapsed time between Trip & Restore.

    Thank you, take care and stay safe!!!
    Attached Files Attached Files

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Date format

    Can you use:

    =DATEVALUE(LEFT(B3,10))
    =TIMEVALUE(RIGHT(B3,5))

    Format the datevalue as Date (e.g. Short Date)
    Format the timevalue as Time

    Or customize the formats of the output. Dates and Times are whole/decimal numbers in Excel.

    May 26, 2021 = 44342
    11:00 AM = 0.4583

    So May 26, 2021 at 11:00am would be 44342.4583

  3. #3
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,417

    Re: Date format

    Just add 0 to your formulas and then format the cell to display the way you want. For example, where you have...

    =LEFT(B3,10)

    change it to this...

    =0+LEFT(B3,10)

    Do the same for you time formula.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,834

    Re: Date format

    The first thing I did was put =ISTEXT(B3) into a convenient cell and copy down to see if all of these dates are text strings or real numbers/dates. They appear to all be text strings, so I select column B -> Text to Columns -> Delimited (Next) -> Next -> At step 3 of the Text Import Wizard, specify MDY dates for this column of data -> Finish. The date/time stamps are all converted to numbers. It appears that number formatting has some of them formatted as yyyy/mm/dd and others are m/dd/yyyy and some include a time of day in the number format. It all looks correct.

    At this point, elapsed time can be calculated as =B4-B3 (copied down every other row) will calculate the time difference. Format as an elapsed time format ([hh]:mm or [mm]:ss or similar) to see the time difference in a more desirable format (or leave it unformatted where the result means "days").

    Questions?
    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. Converting from the 1904 date format to the 1900 date format without losing data
    By Patty McJorst in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-01-2020, 12:53 PM
  2. [SOLVED] Converting Date & Time (General format) to Date (Date format)
    By supremenuts in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2017, 12:55 PM
  3. Replies: 4
    Last Post: 04-29-2015, 08:36 AM
  4. Date Format Of User PC Changes Display format date of Excel File after update
    By waihar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2014, 03:09 AM
  5. Replies: 5
    Last Post: 02-08-2013, 11:06 AM
  6. Need Formula/VBA Code to convert date in String Format to Normal Date format
    By Karthik Sen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2012, 04:54 AM
  7. Column Range with date Format MM/DD/YYYY independate of sys date Format
    By gaursh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2011, 03:31 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