Date: Tue, 8 Feb 2005 15:46:30 -0800
Reply-To: nevin <nevinkrishna@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: nevin <nevinkrishna@HOTMAIL.COM>
Subject: Re: obtain the date part
Content-Type: text/plain; charset="iso-8859-1"
Try this as an example using the datepart function:
where mrb_rp_birth_date is the initial time/date variable..
DOB=datepart (mrb_rp_birth_date); format DOB mmddyy9.;
dob will then just contain the date of mrb_rp_birth_date (without time)
and format it with mmddyy9.
hope this helps, Thanks, Nevin
> Hi all,
> I have a date variable together with time, such as "7/24/96 18:36:45"
> or "10/12/96 20:26:54", how can I obtain the only date part such as
> "7/24/96" or "10/12/96"?
> Please note the length of the date part is different.
> Thank you for your help.