Borrar filtros
Borrar filtros

Find the data same week day one year ago.

3 visualizaciones (últimos 30 días)
Juan Carlos Pozuelos Buezo
Juan Carlos Pozuelos Buezo el 2 de Dic. de 2019
Comentada: Juan Carlos Pozuelos Buezo el 2 de Dic. de 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

Respuesta aceptada

Steven Lord
Steven Lord el 2 de Dic. de 2019
You want the date exactly 52 calendar weeks ago?
datetime('today')-calweeks(52)
  1 comentario
Juan Carlos Pozuelos Buezo
Juan Carlos Pozuelos Buezo el 2 de Dic. de 2019
Thanks Steven, yes! i need the data for the same week day and hour one year ago.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Dates and Time en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by