Problem Converting date to month in text for use in pivot table

P

Peters

Hi,

I have a list with time entries

Date Hours worked Month
2008-10-01 4
2008-10-15 6
2008-11-01 3

I would like to add a column to the right with month in text such as oct,
nov in the example above. I have done that with formatting the date column
with "mmm", but when using that data as column data in a pivot-table, oct
appears twice (which is not surprising since it is actually different dates
in the cells even though it only shows month). So, what I think I need is
oct, nov and so on in text format in my month column so that it works in
pivot-tables.

How do I do that?

Thanks in advance,
Peter S
 
S

ShaneDevenshire

Hi,

Suppose your date start in A2 then the formula for your text month is
=TEXT(A2,"MMM")

As an aside, you could group the Date field by month in the pivot table so
there would be no need for a dummy text field. Put your cursor in the date
field of the pivot table and choose PivotTable, Group and Show Detail, Group.
Select Months if necessary and click OK.

If this helps, please click the Yes button.
 
P

Peters

Dear Shane,

I went straight for the second solution, which of course was a lot smarter
than my dummy column. It worked perfectly!

Many thanks for a quick reply!

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top