フィルターのクリア

Splitting the first cell of my table into two

2 ビュー (過去 30 日間)
Noush
Noush 2021 年 10 月 26 日
回答済み: Srijith Kasaragod 2021 年 10 月 28 日
I have a table, in which the first cell has the date and then the time stored, but like this: 20050101:0030. So what seperates date and time is the double points. I cannot import it as a date and time though, that returns me NaT instead of values. Thats why I cant apply the timeofday command.
How can I split the first column of my table, so that I get two new columns, one with the time and one with the date?
Thank you :)
  1 件のコメント
KSSV
KSSV 2021 年 10 月 26 日
Read about strsplit

サインインしてコメントする。

回答 (1 件)

Srijith Kasaragod
Srijith Kasaragod 2021 年 10 月 28 日
Hi Noush,
You can separate the values using 'strsplit' function by giving delimiter argument as ':' in this case. It would return two strings, one with date and other time.
Regards.

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by