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 1997, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 15 Aug 1997 16:41:27 -0600
Reply-To:     fclpam@nersp.nerdc.ufl.edu
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Tian, Ching" <tianc@MEDIMMUNE.COM>
Organization: Deja News Posting Service
Subject:      Re: SAS date display problem

Dear Pam:

All you need to do is: UDATE=DATEPART(SYS_TIME); FORMAT UDATE DATE7.;

Ching Tian

In article <Pine.A41.3.95.970814172856.29562D-100000@spnode03.nerdc.ufl.edu>, Pamela A Mydock <fclpam@NERSP.NERDC.UFL.EDU> wrote:

> > Hello SASers, > > Please help a rookie struggling with an IBM binary date format problem. > What I would like to do is pass RMFSTAMP8. date/time data to another > variable in a SAS format, so eventually I can extract unique dates and > days of the week. Here is an excerpt of the code and a sample of the > output. > > DATA ONE ; > INFILE FILEIN ; > INPUT @1 TASK PD4. /* TASK NUMBER-NNNNNNNC */ > @5 SYS_TIME RMFSTAMP8.; /* 0HHMMSSF,00YYDDDF--PD8. */ > FORMAT SYS_TIME DATETIME17. ; > UDATE=SYS_TIME ; > FORMAT UDATE DATE7. ; > PROC PRINT; > > output sample looks like this: > > OBS TASK SYS_TIME UDATE > 1 221 14AUG97:06:52:29 ******* > 2 225 14AUG97:06:52:40 ******* > 3 227 14AUG97:06:52:46 ******* > 4 231 14AUG97:06:52:55 ******* > > Other information -- when I omit the DATETIME17. expression, the print out > for SYS_TIME for observation 1 is 1187160749 and UDATE is 11871. Various > other SUBSTR assignments for UDATE have yielded a date of 02Jul92, which > apparently represents the SAS date value of 11871, but not 14AUG97! > > I have been bouncing around in a stack of SAS manuals (overwhelming!) and > I cannot find the technique I need to get the correct display. So far > only DATETIME17. gives me a printout with anything other than asterisks, > but this format does not let me separate the date from the time so I can > look for unique dates in sequence and capture activity by day of the week. > > Can anyone help me in my quest? > > Thanks, Pam > > ----------------------------- > Pamela Mydock > fclpam@nersp.nerdc.ufl.edu > -----------------------------

-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet


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