Forum Discussion
jamess2150
Sep 13, 2024Copper Contributor
How to convert Text to Date?
I've extracted a sheet like this with a webscrapper tool but it formates dates like this - is there a formula etc to make sure it formats it into a mm/yy format? Even if it says 3 years ago, wo...
SergeiBaklan
Sep 13, 2024Diamond Contributor
As variant
=LET(
period, SUM( ISNUMBER( SEARCH({"week","month","year"}, A1 ) )*{0,-1,-12} ),
amount, IFERROR(--LEFT(A1, FIND(" ", A1)-1 ), 1),
IF( period = 0, TODAY()-7*amount, EDATE( TODAY(), amount*period) )
)