| Date: | Tue, 19 Feb 2008 11:40:34 -0500 |
| Reply-To: | DP <adsingh78@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | DP <adsingh78@GMAIL.COM> |
| Subject: | SAS date |
|---|
Hi,
I have a SAS date issue here. How can I do this in SAS. I have 2 situations
here:
1.
if only the date is available the new variable (VAR3) should be in the form
of 11APR1999:00:00:00 (SAS DATETIME20. format)
2.
if both date and time are available then new variable (VAR4) should be in
this format 11APR1999:12:30:00 (SAS DATETIME20. format)
PS: VAR1 and VAR2 are character.
DATA:
ID var1 var2
018100009 05DEC2007 12:06
018100009 14DEC2007
018200086 08JAN2008 15:16
018200095 08JAN2008 12:10
018500019 10DEC2007
018500019 19DEC2007 10:03
018500020 10DEC2007 09:03
018500020 19DEC2007 09:08
018500021 09JAN2008 10:19
018500021 09JAN2008 10:19
Thanks.
DP
|