Excel Date Time Formatting - excel

I am trying to format a datetime so that Excel can read it. So far, I've been able to convert by separating the date from text to strings, but might there be an easier way to account for "EDT"?
Note that the EDT doesn't matter, as all the times are in "EDT". However, if there is timezone functionality, that would be great.
The string:
Wed Jul 01 02:57:58 EDT 2015
How I'd like Excel to read it, where the "."s represent text to ignore:
ddd mmm dd hh:mm:ss ... yyyy

Maybe:
=DATE(RIGHT(A1,4),MONTH(DATEVALUE(MID(A1,5,3)&"1")),MID(A1,9,2))+TIMEVALUE(MID(A1,12,8))

Pnuts formula works absolutely. I have couple more ideas which you can give a try,
=TEXT(RIGHT(SUBSTITUTE(A1,"EDT ",""),20),"mm/dd/yyyy")
This formula converts it to mm/dd/yyyy format.
However if you want to include time also, please try the below formula,
=TEXT(RIGHT(SUBSTITUTE(A1,"EDT ",""),20),"mm/dd/yyyy hh:mm:ss")
You can change the format in TEXT function as per your needs. Hope this helps.

Related

How can I split" Feb 9 2022, 9:55 PM" in excel by a formula?

The Format is Date
=INT() didn't work
Just because you format it as a date does not make it so. This is probably a date stored as text not a true date which if you changed to general format would change to a number. You will need to parse the string and put the "date" in a format that excel can understand then take the INT to get just the date:
=INT(--REPLACE(SUBSTITUTE(A1,",",""),FIND("{{{",SUBSTITUTE(A1," ","{{{",2)),0,","))
One note, this method only works if the month value like Feb is in the local language. If one has a local language of Portuguese Feb is not the correct abbreviation, and as such will fail.
Use the builtin date functions Day() Month() Year() Hour() Minute().

Convert date Excel

Trying to convert Italian date. I got dates from pdf like 21 Giu 2020 which I paste into Excel and then try to format cells and choose option "Date" and 14-mar-12 there but it does not respond. It does only when I change 21 Giu 2020 to 21.12.2020 then it is 21-giu-2020.
Is there any way to automate it, else I need to search upon Italian months and conver Ago to 08, Giu to 12 etc etc?
If your locale isn't Italian, I doubt that Excel would ever recognize a string like that as a date. Here is a formula that would create the date for you:
=DATE(RIGHT(A1,4),MATCH(MID(A1,4,3),TEXT(DATE(2020,SEQUENCE(12),1),"[$-410]mmm"),0),LEFT(A1,2))
The avobe usage of SEQUENCE requires ExcelO365. I also made the assumption your text is always in the pattern "dd mmm yyyy".
You'll end up with a date which you can then use number formatting of your liking.

Convert Date/Time Text String to Time Format

I am running a report on a website that spits this out in a CSV format:
Thu May 07 2020 12:16:08 GMT+0000 (Coordinated Universal Time)
I want to convert it to a time format in Excel, ideally MM:SS (no hours needed). I need to be able to add/subtract two times.
Tried various formulas, but the string is so long I keep confusing myself. Can someone assist?
Consider:
=TIMEVALUE(MID(A1,FIND(":",A1)-2,8))
with the proper formatting.

Converting date in excel

I need to convert the below date format in excel.
Currently I have: Fri Jan 06 05:10:31 2017
Current Format : ddd MMM dd hh:mm:ss yyyy
I wanted to be in the following format: dd/mm/yyyy hh:mm:ss
You need to remove the day from the string, convert it to a number then format the way you want.
To do the first two steps use this formula:
=--MID(A1,5,LEN(A1))
The third is a custom format:
As per the comment:
Yet another approach:
=DATEVALUE(MID(A1,9,2)&MID(A1,5,3)&RIGHT(A1,4))
If you are running into trouble with regional DMY vs. MDY system settings, parse it out longhand so no interpretation is performed; i.e. give the conversion no options.
=DATEVALUE(REPLACE(MID(A2, 4, LEN(A2)), 8, 9, ","))+TIMEVALUE(MID(A2, 12, 8))
You can format it and everything from the formula bar (no need to go in and set formatting).
=TEXT(MID(A1,5,LEN(A1)),"dd/mm/yyyy hh:mm:ss")

How to convert a date entered as a string to a Date type in Excel?

I have a large spreadsheet that contains, among other things, date entries in the form of:
Fri, 03 May 2013 07:04:46 GMT
I haven't been able to find a way, within Excel proper, to manipulate this down to a date object it recognizes. The problem is, I don't extract the spreadsheet or have any control over how this data is provided, and there are a LOT of entries -- to many to manually change them. Further, while my first thought is to simply crank out a Perl script to roll through and do it for me, this won't do because I'm just prototyping a process that will be handed off to someone that wouldn't know Perl from Pearl. It needs to be something doable only in Excel, and other than sorting and basic equations and such, I'm pretty much an excel noob.
My require is simply that I need to be able to sort the column contain these values as a date.
Thanks!
If there are specifically three characters for the month, then you could use:
=DATEVALUE(MID(A1,6,11))+TIMEVALUE(MID(A1,18,8))
Format the Cell to a Date, using something like dd/mm/yyyy hh:mm:ss if you want to confirm that the time is correctly interpreted.
If you don't need the time then just omit the +TIMEVALUE().
You can use =LEFT, =MID and =RIGHT to extract the different parts of the string, and manipulate them further. The string format isn't unambiguous from your example, but I'm assuming that it's 3-char weekday, dd mmm yyyy date, and hh:mm:ss time.
If your data is in column A:
=LEFT(A1, 3)
returns Fri
=MID(A1, 6, 11)
returns 03 May 2013, and =VALUE() on that returns the date serial number for 3 May 2013.

Resources