Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel interpreting dates improperly

Status
Not open for further replies.

logius

Programmer
Aug 30, 2001
175
US
(I posted this in the MS:Office forum as well)
Well, wouldn't you know it? As soon as my application is finally running, Excel throws a wrench in the gears.

What I have is a chart generation macro using userforms and such to set ranges of user-defined data to include in graphs. Problem is, the data I have coming in via a .CSV file (being generated by another program I have no control over) is being interpreted improperly in Excel. The line in question is a set of dates ranging from Jan-98 up to whenever. Now, the format of the dates is just like you see ("mmm-yy"), that is, until it gets to the current year's data. Suddenly, the .CSV data format changes from Jan-98 to 01-Jan . Well, sweet old Excel interprets this as 1/01/2001, which is fine. However, I also have data extending into 2002, and the format also ends up as 02-Jan. Excel, though, is reading this as 1/02/2001 when it should be 1/01/2002. I've tried reformatting the data as "yy-mmm" then formatting it to "mmm-yy", but it still ends up as 1/02/2002. Any suggestions? ----------------------------------------
If you are reading this, then you have read too far...

lightwarrior@hotmail.com
 
Oops, it should be "but it still ends up as 1/02/2001." ----------------------------------------
If you are reading this, then you have read too far...

lightwarrior@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top