필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
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
Guillaume
Guillaume 2016년 9월 28일
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.

댓글을 달려면 로그인하십시오.

답변 (2개)

naadiya khudabux
naadiya khudabux 2016년 9월 28일
편집: naadiya khudabux 2016년 9월 28일
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 2016년 9월 28일
i become able to manage it somehow but the i want it in one column vector . i have tried squeeze function

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by