DateTime conversion from Table Column
9 次查看(过去 30 天)
显示 更早的评论
I have a table (from ASCII file) that has various information in it. The first column is a 'DateTime' and has units of 'ticks'. It is supposed to be a Long Integer, but when loaded in the table, it shows up in scientific notation (double). How do I force that to be an integer, at load time?
Then, the next question is how to convert a DateTime entry into something useful. There is the ConvertTo function in the financial toolbox, but I have no access to it.
采纳的回答
Star Strider
2020-9-17
The datetime function has a 'ConvertFrom' option. For one example, see: Convert Excel Date Number to Datetime There are other options such as 'posixtime'.
1 个评论
更多回答(2 个)
Djamil Boulahbal
2020-9-17
1 个评论
Star Strider
2020-9-17
Those functions are available in core MATLAB.
Click on the link I posted. It will take you to the appropriate section of the datetime. documentation.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!