Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unusual Date Format | Excel Discussion (Misc queries) | |||
Unusual Date Format | Excel Discussion (Misc queries) | |||
Display the date in an unusual format | Excel Discussion (Misc queries) | |||
I'm having an unusual problem with changes in formats in a cell | New Users to Excel | |||
Using Web Queries -- unusual problem | Excel Programming |