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 (February 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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>
Organization: http://groups.google.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

Xiaobin wrote: > 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. > > Best, > Xiaobin


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