Use textscan to read dates with time zone
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Dates and Time 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!