![]() |
Unusual date problem
I received an excell file from a company and made corrections to it. The
dates that came from the company are formatted as "general", but they display as MM/DD/YYYY. When we added dated to the file, (MM/DD/YYYY) they were added as the Date format *M/D/YY. When I tried to change them to general, they displayed as a number, not a date. When I import the file into SAS, they are read as numeric variables. Is there any way to format all of the dates in the spread sheet so that they are read as the same variable type by SAS? THANK YOU! -- CD |
Unusual date problem
On Fri, 28 Aug 2009 15:47:01 -0700, CD wrote:
I received an excell file from a company and made corrections to it. The dates that came from the company are formatted as "general", but they display as MM/DD/YYYY. When we added dated to the file, (MM/DD/YYYY) they were added as the Date format *M/D/YY. When I tried to change them to general, they displayed as a number, not a date. When I import the file into SAS, they are read as numeric variables. Is there any way to format all of the dates in the spread sheet so that they are read as the same variable type by SAS? THANK YOU! It is likely that the original Excel file you received had the dates as TEXT fields and not as true Excel dates. The latter are stored as serial numbers, where 1 = 1 Jan 1900. The dates you subsequently added were converted by Excel into true Excel dates. I'm not familiar with SAS or it's importing rules. Working in Excel, I would change the dates in your imported file into "real Excel dates". One way of doing this is to select the dates in that company file; then Data/Text-to-Columns and when you get to the appropriate screen, select Date for the type of information and MDY for the format. After that, all your dates in Excel will be "proper dates". What you will need to do subsequently, to have SAS interpret these properly, is knowledge that is "above my pay grade". --ron |
All times are GMT +1. The time now is 09:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com