Separate date and time
Show older comments
I have the datetime in a column as given in an attached example excel sheet. Between date and time there is an alphabet T. Can I get a help to seperate out date and time.
Thanks!
Answers (1)
dt = datetime('now') % Sample data
theTime = timeofday(dt)
theDate = dt - theTime % or
theDate2 = dateshift(dt, 'start', 'day')
Categories
Find more on Time Series Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!