Extract Cell Data Contain With Char

1 次查看(过去 30 天)
Hi, Community
I just have a simple answer... How to extract this cell data :
fg = '{'07-Apr-2022'; '08-Apr-2022'; '09-Apr-2022'}';
Into :
fg = [07-Apr-2022; 08-Apr-2022; 09-Apr-2022] (datetime array)
Thank you so much...

采纳的回答

KSSV
KSSV 2022-4-21
fg = {'07-Apr-2022'; '08-Apr-2022'; '09-Apr-2022'};
datetime(fg)
ans = 3×1 datetime array
07-Apr-2022 08-Apr-2022 09-Apr-2022
  4 个评论
Tyann Hardyn
Tyann Hardyn 2022-4-21
Its from uicalendar output when i pick a multiselect dates, Sir
Deepak Gupta
Deepak Gupta 2022-4-21
Can you try
fg = datetime(fg,'InputFormat','dd-MMM-yyyy')

请先登录,再进行评论。

更多回答(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