How to remove a part of a character?

조회 수: 1 (최근 30일)
Behrooz Daneshian
Behrooz Daneshian 2023년 1월 3일
편집: Voss 2023년 1월 3일
Hi all,
Suppose that I have a character called Date='1938-03-01'. I want to remove the year part(1983). 1983 is just an example. I want to remove any year form the date. How can I do that?

채택된 답변

Voss
Voss 2023년 1월 3일
편집: Voss 2023년 1월 3일
Date = '1938-03-01';
Date(1:4) = []
Date = '-03-01'

추가 답변 (0개)

카테고리

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