Use textscan to read dates with time zone
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Dates and Time en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!