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

2 vues (au cours des 30 derniers jours)
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 commentaire
Guillaume
Guillaume le 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.

Connectez-vous pour commenter.

Réponses (2)

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

Catégories

En savoir plus sur Dates and Time dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by