Date: Mon, 19 Jun 2006 16:12:47 +0000
Reply-To: iw1junk@COMCAST.NET
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ian Whitlock <iw1junk@COMCAST.NET>
Subject: Re: sas problem
Ankur,
A better subject line might be "date time input problem with tab separated
data", since all relevant problems on SAS-L are "SAS problems". Here is
log illustrating a possible way to read with space separated data.
25 data w ;
26 infile cards dsd dlm=" " ; * dlm="09"x ;
27 input BWBLFL $ BWSTDTC $ BWENDTC :anydtdtm. ;
28 list ;
29 format BWENDTC datetime. ;
30 put bwendtc ;
31 cards ;
09MAR05:01:54:25
RULE:
----+----1----+----2----+----3----+----4----+----5----+----6----+
32 g Y 2005-03-09T01:54:25
Ian Whitlock
===============
Date: Mon, 19 Jun 2006 10:30:34 -0400
Reply-To: Ankur Arora <ankur.arora@NAGARRO.COM>
Sender: "SAS(r) Discussion"
From: Ankur Arora <ankur.arora@NAGARRO.COM>
Subject: sas problem
i have a data like this
TUDYID 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
This is the tab separated data.
now what i want is to format this output date time 2005-03-09T01:54:25
since for now it is taking the value 2005-03-09 but i can't use informat
since in this i have to specify variable name .And i would be replicating
this for different variable names but i want a formatted output
can anybody help
|