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 (August 2007, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 29 Aug 2007 15:31:49 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:      Re: Date format

On Wed, 29 Aug 2007 19:11:16 +0000, toby dunn <tobydunn@HOTMAIL.COM> wrote:

>Im gonna jump in here and say this first find out if th evariable is a SAS >Date or DateTime value. It is possible to format a SAS Date value with >DateTime format.

But that invariably maps to a time during 1 Jan. 1960, which is not what we see here.

>The time being all 0's concerns me enough to promt you to >atleast find this out before you go any further. > > > >Toby Dunn > >Comprimise is like telling a lie, it gets easier and easier. Each >comprimise you make, that becomes your standard. > >Perfection doesnt exist, once you reach it, its not perfect anymore. It >means something else. > > > > > >From: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM> >Reply-To: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM> >To: SAS-L@LISTSERV.UGA.EDU >Subject: Re: Date format >Date: Wed, 29 Aug 2007 12:04:25 -0700 > >No, the value is stored as the number of seconds since >'01JAN1960:00:00:00 'dt, independent of how it appears in the output. >The variable in question apparently has the format datetime18. >associated with it which only controls how it is printed by default. > >If you want only the date part of the value, you have at least two >options. > > 1 - When printing the value, specify the datetime9. format. >This will override the default format and truncate the output to the >first nine characters. > > 2 - Extract the date portion of the value with the datepart >function and print this with the date9. format. > >-----Original Message----- >From: sas biology [mailto:snip] >Sent: Wednesday, August 29, 2007 10:51 AM >To: SAS-L@LISTSERV.UGA.EDU >Subject: Date format > >Hello, > >The date value in one of my date sets is stored in the format ' >18JUL2005:00:00:00'. But I want to change it to '18JUL2005' format. How >can >I do that? > >_________________________________________________________________ >Tease your brain--play Clink! Win cool prizes! >http://club.live.com/clink.aspx?icid=clink_hotmailtextlink2


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