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 (May 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 21 May 2008 10:12:30 -0500
Reply-To:   "data _null_," <datanull@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "data _null_," <datanull@GMAIL.COM>
Subject:   Re: Changing Default DATETIMEnn print format
Comments:   To: Friar Broccoli <EliasRK@gmail.com>
In-Reply-To:   <74a6553d-59af-4925-b7c0-9cc991b5984f@x35g2000hsb.googlegroups.com>
Content-Type:   text/plain; charset=ISO-8859-1

Would the IS8601DT format suite your needs. You can associate this format with all datetime variable in all data sets. Then it is the "default" when using proc print or any other proc.

If this is not suitable you can create a PICTURE format that will display dates, times, and datetimes in almost any arrangement you can imagine.

data dt; dt='21MAY2007:17:37:00'dt; format dt is8601dt.; run; proc print; run;

2007-05-21T17:37:00

On 5/21/08, Friar Broccoli <EliasRK@gmail.com> wrote: > When doing a PROC PRINT of data containing > a DATETIMEnn value the default output format looks > like: > > 21MAY2007:17:37:00 > > which is a real pain because such text cannot be > sorted by tools outside of SAS. > > Is there some way of changing the *DEFAULT* behavior > so the result looks more like: > > 2007-05-21:17:37:00 > > I'm not hopeful that this is possible, but if I don't ask ... >


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