Find the data same week day one year ago.
1 view (last 30 days)
Show older comments
Juan Carlos Pozuelos Buezo
on 2 Dec 2019
Commented: Juan Carlos Pozuelos Buezo
on 2 Dec 2019
Hi friends.
I have electricity demand data every 24 hours for every day of several years ago. I need to obtain for each data of the same day of the week of the previous year. That is, if I have the data of Monday, December 2, 2019 at 5:00 p.m., I would like to have the data of Monday, December 3, 2018 at 5:00 p.m., which corresponds to the first Monday of the month of December , and like that for all data.
I have seen that with Financial Toolbox there are some useful tools, but I do not have that tool. thanks for your help
my data is:
fecha hora hora2 MW_Demanda Real
mar 1/04/08 0:01 1:00 678.5
mar 1/04/08 1:01 2:00 669.1
mar 1/04/08 2:01 3:00 668.2
mar 1/04/08 3:01 4:00 670.1
mar 1/04/08 4:01 5:00 765.8
mar 1/04/08 5:01 6:00 867.5
mar 1/04/08 6:01 7:00 898.6
mar 1/04/08 7:01 8:00 932.6
mar 1/04/08 8:01 9:00 1007.9
0 Comments
Accepted Answer
Steven Lord
on 2 Dec 2019
You want the date exactly 52 calendar weeks ago?
datetime('today')-calweeks(52)
More Answers (0)
See Also
Categories
Find more on Dates and Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!