Add date stamp to time stamp
Afficher commentaires plus anciens
Hi,
I have a 270176x15 table (see attached a reduced version of it, called BB.mat) where one of my arrays is Time (with measurements every second). Date stamp is missing, and I have two questions about this:
1) How can I add the date stamp (Date) that changes accordingly to my Time (i.e. changes day from 23:59 to 00:00) IF
2) (IF) the only date reference I have is: my last timestamp (i.e. 16:05:07) corresponds to 21/05/2018? (so basically I know the end date but not the start date).
Does anyone know how to do this? Any help will be very much appreciated!
Réponse acceptée
Plus de réponses (1)
Sulaymon Eshkabilov
le 1 Nov 2019
Hi,
these commands will resolve your task:
load BB
EEE=datenum(HRV_BB3.Time);
DATES = datestr(EEE, 'mm/dd/yy');
You'd need to adjust the starting day or end day.
Good luck.
3 commentaires
vicsm
le 1 Nov 2019
Sulaymon Eshkabilov
le 1 Nov 2019
Modifié(e) : Sulaymon Eshkabilov
le 1 Nov 2019
The data you have provided BB.mat works very well. Probably the data (mat file) you are using is different from the one you have provided here - BB.mat

Catégories
En savoir plus sur Time Series Objects 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!