Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Convert Date in Excel from mm/dd/yy to yyyymm

Hello there - i'm trying to convert a date in a cell from mm/dd/yy to
yyyymm.

In cell A1 i have a date: 12/31/07
In cell B1 i put: =A1
Then i 'formatted' B1 to yyyymm using the "custom" format feature.

Problem is, that although B1 "displays" correctly (200712), the data
stored in the cell is still "12/31/07" format.

This is causing problems when i create pivot tables because each date,
again, although displays "200712", shows one record for each date.
ie:

My pivot shows:

Month.......# Widgets
200712 ........ 5
200712 ........ 10
200712 ........ 15

When what i want to see is:
200712 ........ 30

The pivot will not sum all of 200712, because the data is stored with
each unique "day" value.

Could use your assistance!
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Convert Date in Excel from mm/dd/yy to yyyymm

Insert a column with

=TEXT(A1,"yyyymm")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in message ...
| Hello there - i'm trying to convert a date in a cell from mm/dd/yy to
| yyyymm.
|
| In cell A1 i have a date: 12/31/07
| In cell B1 i put: =A1
| Then i 'formatted' B1 to yyyymm using the "custom" format feature.
|
| Problem is, that although B1 "displays" correctly (200712), the data
| stored in the cell is still "12/31/07" format.
|
| This is causing problems when i create pivot tables because each date,
| again, although displays "200712", shows one record for each date.
| ie:
|
| My pivot shows:
|
| Month.......# Widgets
| 200712 ........ 5
| 200712 ........ 10
| 200712 ........ 15
|
| When what i want to see is:
| 200712 ........ 30
|
| The pivot will not sum all of 200712, because the data is stored with
| each unique "day" value.
|
| Could use your assistance!
| Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Convert Date in Excel from mm/dd/yy to yyyymm

On Jan 7, 1:45*pm, "Niek Otten" wrote:
Insert a column with

=TEXT(A1,"yyyymm")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in ...

| Hello there - i'm trying to convert a date in a cell from mm/dd/yy to
| yyyymm.
|
| In cell A1 i have a date: * 12/31/07
| In cell B1 i put: *=A1
| Then i 'formatted' B1 to yyyymm using the "custom" format feature.
|
| Problem is, that although B1 "displays" correctly (200712), the data
| stored in the cell is still "12/31/07" format.
|
| This is causing problems when i create pivot tables because each date,
| again, although displays "200712", shows one record for each date.
| ie:
|
| My pivot shows:
|
| Month.......# Widgets
| 200712 *........ 5
| 200712 ........ 10
| 200712 ........ 15
|
| When what i want to see is:
| 200712 ........ 30
|
| The pivot will not sum all of 200712, because the data is stored with
| each unique "day" value.
|
| Could use your assistance!
| Thanks!


That was tooooo easy! Thank you kindly!
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Convert Date in Excel from mm/dd/yy to yyyymm

Sandi,

The simplest and most robust solution is to use the grouping feature of the Pivot table to group by
month, using "sum" in the summarize by for the fields of interest.

HTH,
Bernie
MS Excel MVP


wrote in message
...
Hello there - i'm trying to convert a date in a cell from mm/dd/yy to
yyyymm.

In cell A1 i have a date: 12/31/07
In cell B1 i put: =A1
Then i 'formatted' B1 to yyyymm using the "custom" format feature.

Problem is, that although B1 "displays" correctly (200712), the data
stored in the cell is still "12/31/07" format.

This is causing problems when i create pivot tables because each date,
again, although displays "200712", shows one record for each date.
ie:

My pivot shows:

Month.......# Widgets
200712 ........ 5
200712 ........ 10
200712 ........ 15

When what i want to see is:
200712 ........ 30

The pivot will not sum all of 200712, because the data is stored with
each unique "day" value.

Could use your assistance!
Thanks!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting yyyymm and yyyymmdd to "mmm dd, yyyy" James Excel Discussion (Misc queries) 3 April 5th 07 06:38 PM
Excel. decimal convert date gt Excel Discussion (Misc queries) 1 November 28th 06 02:06 PM
Extracting a Date from a YYYYMM number Matt Excel Worksheet Functions 6 August 30th 06 10:11 AM
How to convert a date into the day name in Excel ? pierrebourgault Excel Discussion (Misc queries) 3 February 8th 06 05:18 PM
how do I convert a UK date to a US date in excel? sls Excel Discussion (Misc queries) 1 May 17th 05 09:12 PM


All times are GMT +1. The time now is 08:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"