extracting files having names with the same date from a dataset
Afficher commentaires plus anciens
I am having some txt files as a training dataset for a modele I'm trying to build.
if we asumed that the txt files names has the format YYYYMMDDHHmm as 196611110428.
if I would like to extract files that have the month=12, day=05, hour=22. discarding the years and the minutes, How I can possibly do that?
Réponse acceptée
Plus de réponses (2)
Sambit Supriya Dash
le 31 Jan 2022
a = 196611110428;
strA = string(a);
d = datetime(strA,'InputFormat','yyyyMMddHHmm');
disp(d)
Month = month(d);
Day = day(d);
Hour = hour(d);
Catégories
En savoir plus sur Calendar dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!