Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CD CD is offline
external usenet poster
 
Posts: 10
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default 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
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
Unusual Date Format Grey Old Man[_2_] Excel Discussion (Misc queries) 1 April 21st 10 08:52 AM
Unusual Date Format Grey Old Man[_2_] Excel Discussion (Misc queries) 0 April 21st 10 08:42 AM
Display the date in an unusual format Barry Excel Discussion (Misc queries) 0 March 31st 10 03:46 AM
I'm having an unusual problem with changes in formats in a cell Marc New Users to Excel 4 July 21st 05 05:22 PM
Using Web Queries -- unusual problem metcab Excel Programming 2 July 13th 05 08:42 AM


All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"