LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) 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 06:36:38 -0600
Reply-To:   Alan Churchill <savian001@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Alan Churchill <savian001@GMAIL.COM>
Subject:   Re: DATETIME conversion by SAS 9
Comments:   To: "Audimar P. Bangi" <audi@SAS2THEMAX.COM>
In-Reply-To:   <8C7FDCBB64FB4CE38010B97C106D9055@AudiPC>
Content-Type:   text/plain; charset="iso-8859-1"

Audi,

Formats are purely a presentation layer. They are not used internally at all with respect to the data values.

You could argue that the EDITOR should warn you if you do something stupid but I am not a fan of SAS's editor. However, the language itself is not the culprit here. The language only knows numeric and string. It doesn't care about the format at all except for display.

Alan

Alan Churchill Savian "Bridging SAS and Microsoft Technologies" www.savian.net

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Audimar P. Bangi Sent: Friday, June 22, 2007 5:14 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: DATETIME conversion by SAS 9

> NO NO NO - there is NO conversion

That's basically my point. :-) SAS doesn't have a true datetime type similar to C#'s System.DateTime type, so it cannot do a realistic custom date formatting in cases where the time unit changes with the format (as in DATE to DATETIME, or the other way around). Because there is no internal conversion of the underlying data, a user like me finds it unrealistic to see the weird date format conversions inside the SAS data editor or table viewer.

> It is the same with SAS defined formats, there is nothing to stop you > attaching DOLLAR15. to variables for date or datetime.

Which is a poor design or editing environment, in my opinion. The SAS data editor should not show formats not appropriate for a date when the column/variable being edited has a TIME/DATETIME format! Who would change a date variable to a DOLLAR or currency variable???

> An application (that e.g. you have written) can "understand" the metadata > embodied in formats but the SAS compiler can not.

That's not true, otherwise it can't do even the most basic format transformation. When it comes to dates, SAS does a "dumb" format transformation because it doesn't recognize any unit changes that comes with the format.

Regards, Audi


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