简体   繁体   中英

extract a date from a cell containing text string in excel

For the Twelve Months Ending Thursday, June 30, 2016

I have the above text in excel and I need an excel formula to extract ONLY the date June 30, 2016 . The formulas I've researched were all for numerical dates (ie 06/30/2016). Would anyone know how to do this? Thanks in advance!

The formula looks like this:

=MID(A1,FIND(",",A1)+1,100)

It does a FIND to figure out where the first comma is, and then returns everything beyond that point.

Extracts a Date as a numeric. Then just format it as a date.

=DATEVALUE(RIGHT(B20,LEN(B20)-FIND(",",B20)-1))
=DATE(RIGHT(A1,4),MONTH(DATEVALUE(LEFT(MID(A1,FIND(",",A1)+2,LEN(A1)),FIND(" ",MID(A1,FIND(",",A1)+2,LEN(A1)-1)))&1)),LEFT(RIGHT(A1,8),2))

希望适用于美国或英国的语言环境。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM