![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 1
|
Not sure if you can help, but i'm trying to work with a time series data file in excel. My problem is that excel will not recognise any dates from before 1/1/1900 and my series runs back to 1850. Have you had any experience with this problem and how to get around it?
|
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
Regards! _________________ Yogi Anand Edit: Deleted inactive web site reference from hard code signature line [ This Message was edited by: Yogi Anand on 2003-01-19 16:44 ] |
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
See http://j-walk.com/ss/excel/files/xdate.htm
Or, store post 1700 dates as text (e.g., A1:B1 contains {"1/1/1850","6/5/1851"}) and add a century (or two) to the dates to accomplish date arithmetic as follow: =(LEFT(B1,LEN(B1)-4)&(RIGHT(B1,4)+100))-(LEFT(A1,LEN(A1)-4)&(RIGHT(A1,4)+100)) ...indicates that there were 520 days between January 1, 1850 and June 5, 1851. And... =DATEDIF((LEFT(A1,LEN(A1)-4)&(RIGHT(A1,4)+100)),LEFT(B1,LEN(B1)-4)&(RIGHT(B1,4)+100),"M") ...shows there were 17 months between these dates. [ This Message was edited by: Mark W. on 2002-05-17 08:31 ] |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
A word of caution... If you opt to add a century (or two) to your post-1700 dates you should avoid the year 1900. Excel treats it as a leap year when in fact it isn't. For more on this see http://support.microsoft.com/search/...;en-us;Q214326.
[ This Message was edited by: Mark W. on 2002-05-20 14:41 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|