LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 22 Jun 2007 18:06:01 -0400
Reply-To:     Joe Whitehurst <joewhitehurst@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Joe Whitehurst <joewhitehurst@GMAIL.COM>
Subject:      Re: DATETIME conversion by SAS 9
Comments: To: "Audimar P. Bangi" <audi@sas2themax.com>
In-Reply-To:  <622B06615F3243898AC2E5F7CB36BF9F@WASILLA>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Audi,

Check out the Physics Guy Rap: http://blog.sciam.com/index.php?title=rapping_about_physics&more=1&c=1&tb=1&pb=1. Now what I would really like to hear is a SAS Gal/Guy Rap! Or a Shakespearean Rap. Could you do it? I'll give you the first line: " SAS to the max no matter whom I have to axe."

Joe

On 6/22/07, Audimar P. Bangi <audi@sas2themax.com> wrote: > > Alan, > > >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 > >granularity. > > 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 > architectural decision. > > >...you leave the values alone and just change how they are presented. > > As I mentioned in my previous post, this behavior yields unrealistic and > weird-looking results. > > > 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 > the time. > > Regards, Audi >


Back to: Top of message | Previous page | Main SAS-L page