Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
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 Kommentar
Guillaume
Guillaume am 28 Sep. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

naadiya khudabux
naadiya khudabux am 28 Sep. 2016
Bearbeitet: naadiya khudabux am 28 Sep. 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 am 28 Sep. 2016
i become able to manage it somehow but the i want it in one column vector . i have tried squeeze function

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by