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 (June 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 20 Jun 2006 12:45:23 -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: sas date time problem

On Tue, 20 Jun 2006 08:09:40 -0400, Ankur Arora <ankur.arora@NAGARRO.COM> wrote:

>Hi, > >I have a question of data in which we are importing the data with proc >imports.Now in one of the variables i have is 2005-03-09T01:54:25 >which gets truncated to 2005-03-09.Can anybody help on this since i want >to use proc import for importing the dataset with time formatted in the >above format.

PROC IMPORT is fine for consistently structured data which follow the rules. Your data-time values do not conform to the SAS datetime informat, which would represent the sample value as

09mar2005 01:54:25

A DATA step can probably do a better job.

Do you receive any kind of dictionary (metadata) with these files? Is there a naming convention? Is the date-time always in the same field position?

> >can it be done such that all the variables are changed to character format >without using the names of variables. > >this is the sample data >tab separated data > >STUDYID USUBJID DOMAIN BWSEQ BWGRPID BWTESTCD BWTEST BWORRES > BWORRESU BWSTRESC BWSTRESN BWSTRESU > BWBLFL BWSTDTC BWENDTC BWSTAT BWREASND >DP1111 13 BW 34 BW Body Weight 266.4 g > 266.4 266.4 g Y 2005-03-09T01:54:25 > >now the variables name changes with changes in the dataset >the next data set will have "ss" instead of "bw".so what statement should >i use in proc import so as to get the correct value of 2005-03-09T01:54:25. > >can anybody help on the meathod to solve this > >Thanks >Ankur


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