Date: Tue, 23 Jan 2007 16:00:17 -0500
Reply-To: Ed Heaton <EdHeaton@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ed Heaton <EdHeaton@WESTAT.COM>
Subject: Re: datetime informat
In-Reply-To: <200701232002.l0NJa99F030534@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Lu,
Unfortunately, you will probably have to read the date and the time
separately and then combine them.
Data _null_ ;
Input _date yymmdd10. _time time12. ;
Put _date= / _time= ;
DateTime = _date * (24*60*60) + _time ;
Put DateTime= dateTime20.3 ;
Cards4 ;
2007-01-10 22:37:11.000
;;;;
Ed
Ed Heaton
RW-4541
#4818
-----Original Message-----
From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu]
On Behalf Of Lu Liu
Sent: Tuesday, January 23, 2007 3:03 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: datetime informat
Hi,
What informat should I use to read a data time field with data as below?
2007-01-10 22:37:11.000
I tried datetime. It didn't work.
Your help is greatly appreciated.
Lu
|