LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 1998, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 21 May 1998 17:00:00 -0400
Reply-To:     HERMANS1 <HERMANS1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         HERMANS1 <HERMANS1@WESTAT.COM>
Subject:      data test;

This example illustrates methods for converting data elements from one type to another, and it shows how you can define composite functions. Also, it proves a reasonably good way to solve your problem. Sig

data test; input ndate; date=input(substr(put(ndate,8.),5,2)||substr(put(ndate,8.),7,2)|| substr(put(ndate,8.),1,4),mmddyy10.); cards; 19940102 18761122 19451218 ; run; proc print; format date date9. ; run;

__________________________ Original Message ________________________________ I was given a permanent sas data set with dates as numeric fields, in the 'yyyymmdd' format. I need to convert these somehow to sas dates so they may be used in comparisons and calculations. Mainly, I need to merge this data set with another, only when one date is prior to another. Does anyone have any suggestions for me as to converting these dates? Thanks.

Melanie Barish Sr. Data Analyst IPRO Lake Success, NY

MelliJ@aol.com


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