datetime format issue?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
alpedhuez
el 12 de Mzo. de 2022
Comentada: alpedhuez
el 12 de Mzo. de 2022
As a continuation of a previous question,
datelimits = datetime({'20080401', '20080402'}, 'InputFormat', 'yyyyMMdd');
outputs
datelimits =
1x2 datetime array
01-Apr-2008 02-Apr-2008
Although it should output
20080401 20080402
Please advise how to fix this issue so that it would output in the correct format.
0 comentarios
Respuesta aceptada
Cris LaPierre
el 12 de Mzo. de 2022
Editada: Cris LaPierre
el 12 de Mzo. de 2022
You have only set the input format, which is used to read in the data, so it is using the default format to display the date. The display format is set using the 'Format' option.
datelimits = datetime({'20080401', '20080402'}, 'InputFormat', 'yyyyMMdd','Format','yyyyMMdd')
0 comentarios
Más respuestas (1)
Arif Hoq
el 12 de Mzo. de 2022
datelimits = datetime({'20080401', '20080402'}, 'Format', 'yyyyMMdd')
Ver también
Categorías
Más información sobre Dates and Time en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!