Cannot use datetime function on {'01 Nov 2019 14:39:50.365'}

17 visualizaciones (últimos 30 días)
Ryan Lynch
Ryan Lynch el 20 de En. de 2020
Comentada: NN el 10 de Mzo. de 2021
Results in following error: Could not recognize the date/time format of '01 Nov 2019 14:39:50.365'. You can specify a format using the 'InputFormat' parameter. If the date/time text contains day, month, or time zone names in a language foreign to the 'en_US' locale, those might not be recognized. You can specify a different locale using
the 'Locale' parameter.
I've tried pretty much everything, what i'm after is converting the above date into juilian time. The juliandate function does not work on the date either.

Respuesta aceptada

the cyclist
the cyclist el 20 de En. de 2020
s = '01 Nov 2019 14:39:50.365';
datetime(s,'InputFormat',"dd MMM yyyy HH:mm:ss.S")
  2 comentarios
Ryan Lynch
Ryan Lynch el 20 de En. de 2020
Worked! I tried this earlier, but I noticed I was missing quotes in the infmt portion, now it works great. Thanks!!
NN
NN el 10 de Mzo. de 2021
Hi , i use this below code and not able to change the date from Dec 31 1899. .Fig image is attached.I would like to change the date from Dec 31 1899 to 17 Feb 2020
Please help .
clc
y=xlsread('time.xlsx');
plugin=y((1:end),8)';
outd = datetime(s,plugin, 'convertfrom', 'excel');
figure
plot(outd)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Type Identification en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by