|Date: ||Fri, 22 Jun 2007 10:01:53 -0400|
|Reply-To: ||"Audimar P. Bangi" <audi@SAS2THEMAX.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||"Audimar P. Bangi" <audi@SAS2THEMAX.COM>|
|Subject: ||Re: DATETIME conversion by SAS 9|
|Content-Type: ||text/plain; format=flowed; charset="iso-8859-1";
>Very few people, IMO, would change a date value to a datetime.
Yes, very few, if any, would do that, but that's a possibility. For example,
if you are joining or merging datasets with mixed DATE/DATETIME formats, you
would probably want to do a conversion to a common date format first. The
conversion offered by the SAS editor would mess things up big time.
>It means changing all of the values in the data being analyzed.
Not really -- only the column/variable that is currently being edited.
>Why? If it is a date value then why would you want every value to reflect
>midnight? Similarly, why change a datetime to a date? You would lose
If SAS doesn't round off days to whole numbers, a double-precision numeric
value should be able to store the date part and the time part for a
DATE-formatted variable. You can then change from DATE to DATETIME (and vice
versa) without losing any significant fraction of the time value. But SAS,
by design, doesn't do any internal conversion for this type of format
transformation inside its Data Editor, which, to me, is not a good
>...you leave the values alone and just change how they are presented.
As I mentioned in my previous post, this behavior yields unrealistic and
> To do a proper conversion requires a pass of all of the data and a change
> in the underlying values.
Only the column/variable that is being edited needs to be changed (when the
user clicks on the "Apply" button). Because the new format after the change
has been applied is persisted with the dataset, you get correct values all