How to split a column in a table into two columns by a space
Show older comments
I have a table of 4 columns. One column is datetime, '2016-02-01 20:48:58.0000000' I would like to split the date and time into two columns. How to do that? Thanks!
Jennifer
Accepted Answer
More Answers (2)
Peter Perkins
on 7 Mar 2016
0 votes
If the variable in your table is literally a datetime, and not a cellstr containing datestrs, then you'll want to split them uing timeofday to get the time part, and dateshift to get the date part.
Categories
Find more on Dates and Time in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!