Transforming a character double into date format

14 visualizaciones (últimos 30 días)
Maria Sarcos
Maria Sarcos el 17 de Sept. de 2021
Respondida: s pernot el 17 de Sept. de 2021
I have a character (double) vector taken from a txt file corresponding to a timestamp of some measurement data, an example of a character is:
197709131435
I want to transform this into a date format eg: 1977 is the year, 09 month, 13 day, 14:35 time. This is to properly separate my data and find daily and seasonal trends.
I tried changing the character into a string and using the datetime function with the input format I want but it didn't work. How can I do this?

Respuestas (1)

s pernot
s pernot el 17 de Sept. de 2021
datetime('197709131435', 'InputFormat', 'yyyyMMddHHmm')

Categorías

Más información sobre Dates and Time en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by