Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Problem with custom date formats

Hi

I'm programmatically populating a column with dates of the format
"yyyymmdd". I'm setting the NumberFormat for the Column to "yyyymmdd". All
values which are being used are being displayed (eg 20000224) as

#########################

How get I get Excel to display the date "as is" whilst maintaining the date
data-type for the column.

Thanks

Simon


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Problem with custom date formats

Excel does not recognize 20000224 as a date but as a number. The number
20000224 does not translate into an Excel date in any way (the highest date
allowed is 12/31/9999 which translates to 2,958,465). In your example, the
date of February 24, 2000 is equivalent to the date value of 36580 in Excel.
If you use 36580 and format it as yyyymmdd you will achieve the desired
result.

--
Michael J. Malinsky
Pittsburgh, PA

"I am a bear of very little brain, and long
words bother me." -- AA Milne, Winnie the Pooh

"Simon Woods" wrote in message
...
Hi

I'm programmatically populating a column with dates of the format
"yyyymmdd". I'm setting the NumberFormat for the Column to "yyyymmdd". All
values which are being used are being displayed (eg 20000224) as

#########################

How get I get Excel to display the date "as is" whilst maintaining the

date
data-type for the column.

Thanks

Simon




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Problem with custom date formats

Thanks Michael

"Michael Malinsky" wrote in message
...
Excel does not recognize 20000224 as a date but as a number. The number
20000224 does not translate into an Excel date in any way (the highest

date
allowed is 12/31/9999 which translates to 2,958,465). In your example,

the
date of February 24, 2000 is equivalent to the date value of 36580 in

Excel.
If you use 36580 and format it as yyyymmdd you will achieve the desired
result.

--
Michael J. Malinsky
Pittsburgh, PA

"I am a bear of very little brain, and long
words bother me." -- AA Milne, Winnie the Pooh

"Simon Woods" wrote in message
...
Hi

I'm programmatically populating a column with dates of the format
"yyyymmdd". I'm setting the NumberFormat for the Column to "yyyymmdd".

All
values which are being used are being displayed (eg 20000224) as

#########################

How get I get Excel to display the date "as is" whilst maintaining the

date
data-type for the column.

Thanks

Simon






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
problem custom sorting a date in an excel file clcnewtoaccess Excel Discussion (Misc queries) 1 January 16th 09 06:15 PM
Date custom formats Jonathan Excel Discussion (Misc queries) 2 September 22nd 06 08:28 PM
importing csv files, problem with date formats jiwolf Excel Worksheet Functions 5 March 7th 06 12:48 AM
I need a macro to convert my date formats into a custom layout. Martyn Excel Programming 0 February 25th 04 12:37 PM
I need a macro to convert my date formats into a custom layout. Martyn Excel Programming 0 February 25th 04 12:29 PM


All times are GMT +1. The time now is 11:30 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"