Reputation: 9581
Looking to convert the following 2015-10-07T23:59:59
into something that Excel actually recognizes as a date so I can then graph/chart with this data... I tried using datevalue and custom formatting but can't get the syntax quite right.
Upvotes: 0
Views: 168
Reputation: 5989
To get datetime from your string, you only need to replace T
with space, convert to numeric and apply appropriate cell format.:
=1*SUBSTITUTE(A1,"T"," ")
Upvotes: 1
Reputation: 990
If the timestamp isn't needed, use =DATEVALUE(LEFT(A1,10))
. If it is needed, then use =DATEVALUE(LEFT(A1,10))+TIMEVALUE(RIGHT(A1,8))
. (Where cell A1 contains the datetime string you are trying to parse).
This will return the Julian date value (E.g. 42284 for the day, 42284.96 for day & time) which you can then apply Excel's built in date formatting to, it will also work for charts and pivot table grouping.
Upvotes: 0
Reputation: 311
I dont know if Excel can understand that type of format date, you should try to write your own custom function to get it in the format that you want.
Upvotes: 0