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 2001, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 31 Aug 2001 09:15:51 -0700
Reply-To:     "Terjeson, Mark" <TerjeMW@DSHS.WA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Terjeson, Mark" <TerjeMW@DSHS.WA.GOV>
Subject:      Re: Converting Datetime to export
Comments: To: "CRDavis@CHECKFREE.COM" <CRDavis@CHECKFREE.COM>
Content-Type: text/plain; charset=iso-8859-1

Hi Chris,

You can use DATEPART() and TRANSLATE() and PUT().

data _null_; x = datetime(); sss = put(x,DATETIME30.6); put x= sss=; new = translate(put(datepart(x),yymmdd8.),'/','-'); put new=; run;

Hope this is helpful, Mark Terjeson Washington State Department of Social and Health Services Division of Research and Data Analysis (RDA) mailto:terjemw@dshs.wa.gov

-----Original Message----- From: Chris R. Davis [mailto:CRDavis@CHECKFREE.COM] Sent: Friday, August 31, 2001 9:02 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Converting Datetime to export

How do I convert a SAS dataset showing DATETIME30.6 into a format that I can download into a text format showing YYMMDD format? I want the field to show as 08/29/01 in my download file. Running SAS version 8.

Chris R. Davis / Risk Analyst Phone: 614-564-4135 Fax: 614-564-3293 E-Mail: crdavis@checkfree.com


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