Use textscan to read dates with time zone
Afficher commentaires plus anciens
I have a text file containing dates of the format:
2016-01-03T16:00:10.000000000-06
The trailing -06 represents a time zone offset from GMT. The offset will take values other than -06. I don't need the offset and would like it to be ignored.
If all offset values were -06, I can read the dates in textscan using the format: {yyyy-MM-dd''T''HH:mm:ss.S''-06''}D However, this value will not always be -06.
Any advice on how to specify a date format that will ignore this trailing number? Note that I do not want to read the date in as a string. Appreciate any help you can offer.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Dates and Time dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!