SOLVED

How can I extract or convert text data into date?

Copper Contributor

Hi there,

 

The data and time data as below is written as text. I'm unable to convert it into date format in order to process further analysis such as =year or = month.

Kindly please advise.

Many thanks

Anthony_Luk_0-1651687137047.png

 

3 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution
Assuming that first row is in cell P2, use =DATEVALUE(P2) You could then go further with =YEAR(DATEVALUE(P2), etc.

@mathetes 

Thanks for your advice 

Try this:
=LET(p,P2,LEFT(p,FIND(" -",p))*1)

Then format cell with custom code: yyy-mm-dd hh:mm:ss
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution
Assuming that first row is in cell P2, use =DATEVALUE(P2) You could then go further with =YEAR(DATEVALUE(P2), etc.

View solution in original post