change julian date to format time
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
nada
el 3 de Jun. de 2018
Comentada: Star Strider
el 3 de Jun. de 2018
Hi
How i can convert Julian date to formatOut = 'mmmm/dd/yyyy hh:mm:ss';
(719801.916666667) (719801.958333333) (719802)
2 comentarios
Paolo
el 3 de Jun. de 2018
Are you sure the values you shared are in Julian date format and not datenum?
a = 719801.916666667;
The command:
datetime(a,'ConvertFrom','juliandate')
Outputs
25-Aug--2742 10:00:00
Whereas converting from datenum:
datetime(a,'ConvertFrom','datenum')
Outputs
30-Sep-1970 22:00:00
Respuesta aceptada
Star Strider
el 3 de Jun. de 2018
I believe those are actually MATLAB datenum numbers. The years do not make sense using 'juliandate' or 'excel' with 'ConvertFrom'.
Try this:
dv = [719801.916666667
719801.958333333
719802];
dta = datetime(dv, 'ConvertFrom','datenum', 'Format','MMMM/dd/yyyy hh:MM:ss')
producing:
dta =
3×1 datetime array
September/30/1970 10:09:00
September/30/1970 10:09:59
October/01/1970 12:10:00
Más respuestas (0)
Ver también
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!