DateTime conversion from Table Column
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Djamil Boulahbal
le 17 Sep 2020
Commenté : Star Strider
le 17 Sep 2020
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.
1 commentaire
Réponse acceptée
Star Strider
le 17 Sep 2020
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 commentaire
Star Strider
le 17 Sep 2020
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Plus de réponses (2)
Djamil Boulahbal
le 17 Sep 2020
1 commentaire
Star Strider
le 17 Sep 2020
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.
Voir également
Catégories
En savoir plus sur Dates and Time dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!