+ Reply to Thread
Results 1 to 13 of 13

Convert Dates in 2011:08:17 format into Dates in Excel

  1. #1
    Registered User
    Join Date
    09-11-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    5

    Convert Dates in 2011:08:17 format into Dates in Excel

    Dear Forum,
    I'm sure this question has been asked plenty of times, and despite searching the Forum and wider internet I've not yet found an answer suitable to my problem. Any help would be greatly appreciated!

    I'm transferring date-time stamps from an .txt file in the format 2011:08:17 14:15. I paste this data into separate columns, one column for the date and one for the time. I find that excel automatically converts the date into a different format: it becomes "23/03/1900 19:08:17" or "83.80". I need to convert these into a format which reads 2011/08/17 so that Excel recognises it as 17th August 2011.
    I've tried pasting as text only (which continues to give me the 23/03/1900 format), formatting the column to text before pasting, find & replace ":" with "/" (which then gives "23/03/1900 19/08/17") and all manner of other things which don't work. How can I ask Excel to recognise this data as either a date, or even as just unconverted text?

    I have around 4million lines of data, spread across about 50 worksheets, so I can't use a manual function to change these dates as it will take me forever! I also cannot change the format of the original .txt files.

    This seems like such a frustrating problem, I have the data infront of my eyes but I just can't get Excel to see it the same way that I do! Please help! It might help if I point out that I am a Biologist, and these are the date-time stamps from wildlife cameras which I need to get into a workable format for analysis, so my knowledge of computer programming etc is fairly limited :-)
    Thanks in advance,
    Jess
    Last edited by JessRI; 09-11-2012 at 05:44 AM.

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    Hi JessRI

    Can you upload a sample workbook.

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    formatting the column to text before pasting,
    After this you need to paste special values.. offcourse for this you need to first copy the data in some other excel workbook and then copy paste special here. thanks.

    If you still face issue, upload a sample workbook.. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  4. #4
    Registered User
    Join Date
    09-11-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    Hi Kevin,
    Think there is a sample file attached.
    I've also tried formatting the cell as text before pasting, but because the dates use colons Excel still converts them.
    Cheers
    Jess
    Attached Files Attached Files

  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    Hi JessRI

    You have me stumped on this one, I will still have a look at it.

    When you apply General formatting to the dates it is: 83.79724537, strange as the number for 2nd August 2011 is: 40757

    Some info on dates:

    http://www.cpearson.com/excel/datetime.htm

  6. #6
    Registered User
    Join Date
    09-11-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    It is a curious one! I can solve it by copying and pasting just the dates on their own into Notepad, finding and replacing all : with a / and then copying back to Excel. This is still a fairly laborious way of covering 5million lines in different worksheets, and I'm sure there must be an easier way! Thanks for your help so far!

  7. #7
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    Can you post sample data of the dates in txt file!

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    Hi Jess,

    You can put this formula in E2:

    =DATE(INT(C2)*24+HOUR(C2),MINUTE(C2),SECOND(C2))

    Format it as a date, and then copy down.

    You can then convert those formulae to values by highlighting the column, click <copy>, then right-click and choose Paste Special | Values | OK then press <Esc> key. Then you can copy the values and paste over those in column C, then delete column E.

    Hope this helps.

    Pete

  9. #9
    Registered User
    Join Date
    09-11-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    Thanks Pete, that works a treat! I knew there must be a way to do it :-)
    Excellent forum, I will be sure to check here in future when I come across my next problem!

  10. #10
    Registered User
    Join Date
    09-11-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    Hi Kevin,
    Here is a sample of the text files which I use to input data into Excel.
    Cheers
    Jess
    Attached Files Attached Files

  11. #11
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    You're welcome, Jess - glad to be of help.

    Excel had treated those values as if they were times because of the colons, even though you knew they were really dates.

    Pete

  12. #12
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    Thanks Jess

    That had me stumped. At least you got it sorted.

    Kevin

  13. #13
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Convert Dates in 2011:08:17 format into Dates in Excel

    Just for the record, quite simple straight from the text file
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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