Capture only the date in Pivot table

p9j123

Active Member
Joined
Apr 15, 2014
Messages
288
Office Version
  1. 2013
Platform
  1. Windows
I have a bunch of data, one of the column is received date on the following format.

mm/dd/yyy hh:mm

Now when I insert a pivot I am having the following. What do I need to do to group this by date only and do not consider the time?

[TABLE="class: grid, width: 182"]
<colgroup><col></colgroup><tbody>[TR]
[TD]Row Labels[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:41[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:43[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:45[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:52[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:53[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:55[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:56[/TD]
[/TR]
[TR]
[TD]2/9/2018 15:49[/TD]
[/TR]
[TR]
[TD]2/12/2018 10:04[/TD]
[/TR]
[TR]
[TD]2/15/2018 3:29[/TD]
[/TR]
[TR]
[TD]2/15/2018 12:09[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
In your data set, add a helper column B:

Assuming your date/time column is "A", insert a new column B (name it "Date") and add the formula: =text(a2,"mm/dd/yy"), and copy that formula to the end of your dataset. Then refresh your pivot table and add the Date field.

I have a bunch of data, one of the column is received date on the following format.

mm/dd/yyy hh:mm

Now when I insert a pivot I am having the following. What do I need to do to group this by date only and do not consider the time?

[TABLE="class: grid, width: 182"]
<tbody>[TR]
[TD]Row Labels[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:41[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:43[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:45[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:52[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:53[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:55[/TD]
[/TR]
[TR]
[TD]2/9/2018 12:56[/TD]
[/TR]
[TR]
[TD]2/9/2018 15:49[/TD]
[/TR]
[TR]
[TD]2/12/2018 10:04[/TD]
[/TR]
[TR]
[TD]2/15/2018 3:29[/TD]
[/TR]
[TR]
[TD]2/15/2018 12:09[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Or you can just use it directly in a PIVOT table and use the GROUP function.

In the PivotTable, click on one of the dates to select a single cell.
Then right click to bring up the context-menu.
Select GROUP.

A dialog box will appear. You can then choose, Days, Months, Years, etc to suit.

t7d8x1.jpg



If this doesn't work... it's because your date data isn't actually "dates" (numerical) - it would be text / variant and would need to be converted.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top