Effacer les filtres
Effacer les filtres

Extract Cell Data Contain With Char

1 vue (au cours des 30 derniers jours)
Tyann Hardyn
Tyann Hardyn le 21 Avr 2022
Commenté : Deepak Gupta le 21 Avr 2022
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...

Réponse acceptée

KSSV
KSSV le 21 Avr 2022
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 commentaires
Tyann Hardyn
Tyann Hardyn le 21 Avr 2022
Its from uicalendar output when i pick a multiselect dates, Sir
Deepak Gupta
Deepak Gupta le 21 Avr 2022
Can you try
fg = datetime(fg,'InputFormat','dd-MMM-yyyy')

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by