Hi,
Just wondering can someone help or point me in the right direction for this problem.
I need to create hourly data from minute by minute data. I have a file with 2 columns, 1st the date and time (dd/mm/yy hh:mm) the 2nd is a number.
I've used a pivot table, and grouped the data by year, month, day and hour, which is almost what i need. The last part of the problem is getting this information back into 2 columns, I need to merge the year, month, day and hour columns into 1.
This is a sample of the minute by minute data before using the pivot table.[TABLE="width: 215"]
<tbody>[TR]
[TD="align: center"]DateTime[/TD]
[TD="align: center"]Variable[/TD]
[/TR]
[TR]
[TD="align: center"]01/09/2017 00:00[/TD]
[TD="align: center"]10[/TD]
[/TR]
[TR]
[TD="align: center"]01/09/2017 00:01[/TD]
[TD="align: center"]10[/TD]
[/TR]
[TR]
[TD="align: center"]01/09/2017 00:02[/TD]
[TD="align: center"]10[/TD]
[/TR]
</tbody>[/TABLE]
When I pivot this data and group the data by year, month, day and hour I get the following:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Year[/TD]
[TD]Month[/TD]
[TD]Day[/TD]
[TD]Hour[/TD]
[TD]Variable[/TD]
[/TR]
[TR]
[TD]2017[/TD]
[TD]Sep[/TD]
[TD]01-Sep[/TD]
[TD]00[/TD]
[TD]30[/TD]
[/TR]
</tbody>[/TABLE]
What I need to do is get this format back into 2 columns like the data I started with.
Any help really appreciated.
Mick
Just wondering can someone help or point me in the right direction for this problem.
I need to create hourly data from minute by minute data. I have a file with 2 columns, 1st the date and time (dd/mm/yy hh:mm) the 2nd is a number.
I've used a pivot table, and grouped the data by year, month, day and hour, which is almost what i need. The last part of the problem is getting this information back into 2 columns, I need to merge the year, month, day and hour columns into 1.
This is a sample of the minute by minute data before using the pivot table.[TABLE="width: 215"]
<tbody>[TR]
[TD="align: center"]DateTime[/TD]
[TD="align: center"]Variable[/TD]
[/TR]
[TR]
[TD="align: center"]01/09/2017 00:00[/TD]
[TD="align: center"]10[/TD]
[/TR]
[TR]
[TD="align: center"]01/09/2017 00:01[/TD]
[TD="align: center"]10[/TD]
[/TR]
[TR]
[TD="align: center"]01/09/2017 00:02[/TD]
[TD="align: center"]10[/TD]
[/TR]
</tbody>[/TABLE]
When I pivot this data and group the data by year, month, day and hour I get the following:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Year[/TD]
[TD]Month[/TD]
[TD]Day[/TD]
[TD]Hour[/TD]
[TD]Variable[/TD]
[/TR]
[TR]
[TD]2017[/TD]
[TD]Sep[/TD]
[TD]01-Sep[/TD]
[TD]00[/TD]
[TD]30[/TD]
[/TR]
</tbody>[/TABLE]
What I need to do is get this format back into 2 columns like the data I started with.
Any help really appreciated.
Mick