Borrar filtros
Borrar filtros

hi can anybody tell me how to convert date vector classified char class in to date data type?

1 visualización (últimos 30 días)
and i have one column for date and time do i need to split it for the processing i have converted the date from UTC format to GMT. looking for positive response.
  1 comentario
Guillaume
Guillaume el 28 de Sept. de 2016
Please, give an example of your input and what you want as an output.
I have no idea if your input is a date vector or date string (char) and there is no date data type in matlab, there is date string, date number, date vector, and datetime.

Iniciar sesión para comentar.

Respuestas (2)

naadiya khudabux
naadiya khudabux el 28 de Sept. de 2016
Editada: naadiya khudabux el 28 de Sept. de 2016
if true
% code
at the workplace my date variable is seem string variable.
i have tried datevec function and go this error
(>> datevec(RequestTime)
Error using datevec (line 212)
Failed to lookup month of year.
end
if true
% code
for datenum ()
>> datenum(RequestTime)
Error using datenum (line 178)
DATENUM failed.
Caused by:
Error using datevec (line 212)
Failed to lookup month of a year.
>> DateTime(RequestTime) Error using DateTime (line 598) Could not recognize the format of the date/time strings. You can specify a format string using the 'InputFormat' parameter. If the strings contain 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.
end

naadiya khudabux
naadiya khudabux el 28 de Sept. de 2016
i become able to manage it somehow but the i want it in one column vector . i have tried squeeze function

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by