<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Converting character date to numeric in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927507#M364993</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a character birthdate variable and I am trying to convert it to numeric but getting errors in my input function. Thanks&lt;/P&gt;
&lt;P&gt;Here is my code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;birthday_num= input(strip(birthdate), anydtdte.);&lt;BR /&gt;format birthday_num mmddyy10.;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 08 May 2024 13:17:26 GMT</pubDate>
    <dc:creator>Rou</dc:creator>
    <dc:date>2024-05-08T13:17:26Z</dc:date>
    <item>
      <title>Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927507#M364993</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a character birthdate variable and I am trying to convert it to numeric but getting errors in my input function. Thanks&lt;/P&gt;
&lt;P&gt;Here is my code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;birthday_num= input(strip(birthdate), anydtdte.);&lt;BR /&gt;format birthday_num mmddyy10.;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 13:17:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927507#M364993</guid>
      <dc:creator>Rou</dc:creator>
      <dc:date>2024-05-08T13:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927509#M364994</link>
      <description>What’s the error?&lt;BR /&gt;How does the string you want to convert look like?</description>
      <pubDate>Wed, 08 May 2024 13:36:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927509#M364994</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-05-08T13:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927547#M364997</link>
      <description>date mmddyy10 format</description>
      <pubDate>Wed, 08 May 2024 14:41:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927547#M364997</guid>
      <dc:creator>Rou</dc:creator>
      <dc:date>2024-05-08T14:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927548#M364998</link>
      <description>I am getting an error in the input statement.</description>
      <pubDate>Wed, 08 May 2024 14:42:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927548#M364998</guid>
      <dc:creator>Rou</dc:creator>
      <dc:date>2024-05-08T14:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927549#M364999</link>
      <description>&lt;P&gt;So you mean the strings look something like what the MMDDYY format would produce from an actual date value?&lt;/P&gt;
&lt;P&gt;Then why didn't you use the MMDDYY informat in the INPUT() function call?&amp;nbsp; Using the ANYDT... series of informats forces SAS to GUESS what style each string is using to represent a date.&amp;nbsp; It might well assume they are in DMY order and convert April first in the fourth of January.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What errors are you getting?&amp;nbsp; If it is data errors (the string could not be converted) then you should see the invalid values printed in the SAS log.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 14:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927549#M364999</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-05-08T14:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927551#M365000</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/427127"&gt;@Rou&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I am getting an error in the input statement.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;We need to know what the error is, according to the SAS log. Just saying you have an error doesn't tell us anything useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We also need to know what the date in question looks like as a character string, which was also requested earlier by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;. Without this information, its hard to know how to proceed.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 14:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927551#M365000</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-05-08T14:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927552#M365001</link>
      <description>&lt;P&gt;Make it like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  birthdate='05-17-2024';
run;
proc print;
run;


options DATESTYLE=MDY;
data want;
set have;
birthday_num= input(strip(birthdate), anydtdte10.); /* &amp;lt;- ADD 10 HERE */
format birthday_num mmddyy10.;
run;
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Default length for the informt is 9, since you have "mmddyy10 " string it's length is 10...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068/show-comments/false" target="_self"&gt;#Maxim1:&amp;nbsp; Read the documentation.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 14:54:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927552#M365001</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-05-08T14:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927553#M365002</link>
      <description>&lt;P&gt;birthdate 7/14/1942 but stored as a character variable. Error code:&amp;nbsp;NOTE: Invalid argument to function INPUT at line 448 column 15.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 15:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927553#M365002</guid>
      <dc:creator>Rou</dc:creator>
      <dc:date>2024-05-08T15:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927554#M365003</link>
      <description>&lt;P&gt;Show us the entire log for this DATA step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does PROC CONTENTS say this variable that contains the dates is character/text or numeric?&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 15:07:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927554#M365003</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-05-08T15:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927556#M365004</link>
      <description>&lt;P&gt;If you don't include the full context the error messages are not as useful.&amp;nbsp; We do not know what statement is referencing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect the issue is that you did not tell INPUT to read the full string.&amp;nbsp; &amp;nbsp;The default width for ANYDTDTE is 9. So any string with 2 digit month and 2 digit day will be too long.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;9    data test;
10     birthdate='07/14/1942';
11     birthday_num= input(strip(birthdate), anydtdte.);
12     format birthday_num mmddyy10.;
13   run;

NOTE: Invalid argument to function INPUT at line 11 column 17.
birthdate=07/14/1942 birthday_num=. _ERROR_=1 _N_=1
NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to
      missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      1 at 11:17
NOTE: The data set WORK.TEST has 1 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that the INPUT() function does NOT care if the string being read is SHORTER than the WIDTH on the INFORMAT specification being used.&amp;nbsp; So unless there is some reason you want to ignore part of the string just use the MAXIMUM width that the informat supports.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The maximum width supported by MMDDYY is 10.&amp;nbsp; The maximum width supported by ANYDTDTE is 60.&lt;/P&gt;
&lt;PRE&gt;26   data test;
27     birthdate='07/14/1942';
28     birthday_num1 = input(birthdate, anydtdte60.);
29     birthday_num2 = input(birthdate, mmddyy10.);
30     format birthday_num: mmddyy10.;
31   run;

NOTE: The data set WORK.TEST has 1 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;
&lt;P&gt;Result&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1715181364621.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96342iF66D6209AAF86E41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1715181364621.png" alt="Tom_0-1715181364621.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 15:26:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927556#M365004</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-05-08T15:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927560#M365007</link>
      <description>&lt;P&gt;Proc contents shows that it is a char var.&lt;/P&gt;
&lt;P&gt;Here is the log:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Invalid argument to function INPUT at line 16 column 15.&lt;BR /&gt;empi=0 hup_mrn=472646611 pmc_mrn=. pah_mrn=. cch_mrn=. lastname=WINFIELD firstname=SUSIE&lt;BR /&gt;gender_code= birthdate= imageyr=. event_category= i4_mri_screen= proc_code= proc_name=&lt;BR /&gt;osfilm= mammo_laterality= screenep=. screendate=9/20/2022 pat_last_name= pat_first_name=&lt;BR /&gt;hispanic= screenyear=2022 last_mammo_date= lastmammo_year=. mammo_baseline_yn= proc_id=.&lt;BR /&gt;screentype= birads_overall= density_overall=. density_r=. density_l=. finalizing_prov_id=&lt;BR /&gt;finalizingprovname= callback= i1_screening= i2_diagnostic= i3_ultrasound= i4_mri= i5_biopsy=&lt;BR /&gt;i6_other= numimagingrecs=. architecturaldistortion=. asymmetry=. calcification= mass=. lymphnode=.&lt;BR /&gt;firstpathdate= maxoflesioncancer= outcome= interesting_study_c=. interestingstudy=&lt;BR /&gt;risk_menarcheage= risk_fstlivebirth= risk_fstdegrel= risk_numbiopsy= risk_atyphypls=&lt;BR /&gt;gail5year=. gaillifetime=. weight_lbs=. heightininches=. bmi=. cancerreg_dxdate= daysfromscreen=.&lt;BR /&gt;invasive= minofhistobehavioricdo3desc= maxofhistobehavioricdo3desc= maxofcstumorsize=.&lt;BR /&gt;maxofcssitespecificfactor1=. maxofcssitespecificfactor2=. maxofcssitespecificfactor15=.&lt;BR /&gt;maxofcssitespecificfactor22=. maxofcssitespecificfactor23=. nextscreendate= episodecount=. mqsa=.&lt;BR /&gt;DateSigned= SigningPhysicians= StudyLevelOutcome= ComponentLevelOutcome=&lt;BR /&gt;OverallBreastComposition= Patient= Procedure= accessionnumber=46446630 datasource=mqsa age=.&lt;BR /&gt;pmbb_consented=. pmbb_id= brca= brca_num_visits= brca_start_date= ovarian_ca=&lt;BR /&gt;ovarian_ca_num_visits= ovarian_ca_start_date= endometriosis= endometriosis_num_visits=&lt;BR /&gt;endometriosis_start_date= pmbb_sample=. reg_casestatflag= reg_dxdate= reg_facilityname=&lt;BR /&gt;reg_laterality=. reg_histobehavior=. reg_gradedifferentiation= reg_cstumorsize=.&lt;BR /&gt;reg_regionalnodespositive=. reg_regionalnodesexam=. reg_cssitespecificfactor1=. reg_ersummary=.&lt;BR /&gt;reg_cssitespecificfactor2=. reg_prsummary=. reg_cssitespecificfactor15=. reg_her2overallsumm=.&lt;BR /&gt;reg_ajccedition=. reg_summarystage= reg_stage_recode= reg_erpos=. reg_prpos=. reg_her2pos=.&lt;BR /&gt;reg_ajcc8pathprogstage= reg_ajcc8advanced=. reg_sourceregistry= reg_ajcc7= reg_filledstage=.&lt;BR /&gt;reg_subtype4=. casestatflag= bc_ever=0 bc_prior=0 bc_after=0 mammolocation=Fern Hill hp=.&lt;BR /&gt;breast_density=. all_brca1=. all_brca2=. date_of_death= nbiop_cat=. agemencat=. agefstlivecat=.&lt;BR /&gt;n_rels=. gail_score=. gail_score_lifetime=. birads_density=3 AvgBreastAreasqcm_2d=.&lt;BR /&gt;AvgBreastDensity_2d=. AvgDenseAreasqcm_2d=. hispanic_latino=0 race_eth=9 tomo=1 old_vbd_request=.&lt;BR /&gt;PatientName= Race_1= VitalStatus= DeathDate= ZipCode= PreferredLanguage= AnyTamoxifenYn=.&lt;BR /&gt;TamoxifenFirstUphsOrderDate= AnyRaloxifeneYn=. RaloxifeneFirstUphsOrderDate=&lt;BR /&gt;BrcaDxPresentInChartYn=. BrcaFirstDocumentedDate= EpicOrderId=. ProcName= MammogramProcType=&lt;BR /&gt;OrderDate= ExamDate= OrderPriority= BreastOverallBreastComp= BreastImagingOutcome=&lt;BR /&gt;OrderingProvider= PerformingDepartmentId=. PerformingDepartment= NearestBmiEncounterDate=&lt;BR /&gt;NearestBmi=. SecondNearestBmiEncounterDate= SecondNearestBmi=. InsurancePayorName1=&lt;BR /&gt;InsuranceFinancialClass1= InsurancePayorName2= InsuranceFinancialClass2= EncounterCsn=.&lt;BR /&gt;SubmissionDate= AgeFirstPeriod=. agefstperiod=. NumberLiveBirths=. AgeAtMenopause=. agemeno=.&lt;BR /&gt;BreastProblem= HistoryRadiationTherapy= LastMenstrualPeriod= OtherMedicalHistory=&lt;BR /&gt;AshkenaziJewish= MessageId=. Prompt1= PatientResponse1= PatienttResponseDate1=&lt;BR /&gt;PatientResponseComment1= Prompt2= PatientResponse2= PatienttResponseDate2=&lt;BR /&gt;PatientResponseComment2= Prompt3= PatientResponse3= PatienttResponseDate3=&lt;BR /&gt;PatientResponseComment3= Prompt4= PatientResponse4= PatienttResponseDate4=&lt;BR /&gt;PatientResponseComment4= Prompt5= PatientResponse5= PatienttResponseDate5=&lt;BR /&gt;PatientResponseComment5= Prompt6= PatientResponse6= PatienttResponseDate6=&lt;BR /&gt;PatientResponseComment6= Prompt7= PatientResponse7= PatienttResponseDate7=&lt;BR /&gt;PatientResponseComment7= Prompt8= PatientResponse8= PatienttResponseDate8=&lt;BR /&gt;PatientResponseComment8= Prompt9= PatientResponse9= PatienttResponseDate9=&lt;BR /&gt;PatientResponseComment9= Prompt10= PatientResponse10= PatienttResponseDate10=&lt;BR /&gt;PatientResponseComment10= vbd_available=0 uniqueid_new=229876 pat_mrn_id=. sex= race_pds=&lt;BR /&gt;facility= risk_age=. risk_race= birads_assessment=0 birads_assessment_detail=0&lt;BR /&gt;mammo_recommendation=Normal interval follow-up, &lt;BR /&gt;Additional Projections EncounterDate=.&lt;BR /&gt;EncounterId=. BcraScore5Yr=. BcraAge=. BcraAgeAtMenarcheCode=. BcraAgeAtMenarcheDesc=&lt;BR /&gt;BcraFirstLiveBirthCode=. BcraFirstLiveBirthDesc= BcraFamHist=. BcraFamHistDesc=&lt;BR /&gt;BcraNumberBreastBiopsiesCode=. BcraNumberBreastBiopsiesDesc= BcraAtypicalHyperplasiaCode=.&lt;BR /&gt;BcraAtypicalHyperplasiaDesc= BcraRaceCode=. BcraRaceDesc= BcraScoreLifetime=. datelastperiod=.&lt;BR /&gt;agelastperiod=. StudyLevelAssessment= ComponentLevelAssessment= Age_1= ApptDate= Dept=&lt;BR /&gt;EthnicBackground= EthnicGroup= site= screenyr=. ageatscreen=. birads_r= birads_l= maxbirads=&lt;BR /&gt;lastbirads= datesigned_1=09/20/2022 signingphysicians_1=BARAK, ELIZABETH RICHARDSON&lt;BR /&gt;orderingprovider_1=KEAH, JENNIFER HILLIARD [17057152] studyleveloutcome_1=&lt;BR /&gt;componentleveloutcome_1= studylevelassessment_1=0: Additional images for evaluation&lt;BR /&gt;componentlevelassessment_1=Need Additional Imaging Evaluation [0] recommendationsresolved=No&lt;BR /&gt;overallbreastcomposition_1=Heterogeneously dense [3] patient_1=Winfield, Susie apptdate_1=9/20/22&lt;BR /&gt;procedure_1=MAMMO SCREENING BILATERAL TOMOSYNTHESIS dept_1=FERNMAMMO [6156]&lt;BR /&gt;ethnicbackground_1=American/United States [12] ethnicgroup_1=Not Hispanic or Latino [30]&lt;BR /&gt;apptdate2=22908 mrn_1=472646611 dummyaccession=. Recommendation= RecommendationsResolved_1= seq=.&lt;BR /&gt;mammo_outcome= max_recommendation=3 max_biopsy_rec=0 consented=. pmbb_dna_sample_2023=.&lt;BR /&gt;pmbb_plasma_edta_2023=. pmbb_genotyped_2023=. pmbb_status= dna_in_inventory=. genotyped=.&lt;BR /&gt;min_dx_img_time=2 max_birads_date=22908 max_birads=0 max_birads_source=Diagnostic Imaging Linkage&lt;BR /&gt;last_birads_date=0 last_birads=2 last_birads_source=Diagnostic Imaging Linkage&lt;BR /&gt;mammo_recommendation_num=3 new_vbd_request=0 sent_for_vbd=. gghe=0 outcome_dx_90=&lt;BR /&gt;outcome_dx_90_2yr= max_outcome_1yr=. max_outcome_2yr=. acs_fn=0 npv_encounterdate=&lt;BR /&gt;npv_parenthospital= npv_codestandard= npv_dxcode= npv_dxdescription= bc_date=. bc_npv=.&lt;BR /&gt;timetobc=. min_timetobc=. vbd_grant=0 any_vbd_request=0 birthday_num=. _ERROR_=1 _N_=788895&lt;BR /&gt;NOTE: Mathematical operations could not be performed at the following places. The results of the&lt;BR /&gt;operations have been set to missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;4 at 16:15&lt;BR /&gt;NOTE: There were 789597 observations read from the data set WORK.SCMAMO_DROP.&lt;BR /&gt;NOTE: The data set WORK.SCMAMO_CONVERTED has 789597 observations and 335 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 6.13 seconds&lt;BR /&gt;cpu time 2.65 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 16:19:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927560#M365007</guid>
      <dc:creator>Rou</dc:creator>
      <dc:date>2024-05-08T16:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927561#M365008</link>
      <description>&lt;P&gt;Thank you all for the help.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 16:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927561#M365008</guid>
      <dc:creator>Rou</dc:creator>
      <dc:date>2024-05-08T16:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character date to numeric in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927563#M365009</link>
      <description>&lt;P&gt;That is NOT an ERROR.&amp;nbsp; It is a NOTE.&amp;nbsp; You still not NOT include the CONTEXT needed to make complete sense of the NOTE.&amp;nbsp; You did not show the part of the LOG that shows the CODE being run so we don't know what statement was on line 16 and column 15.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But assuming the issue is with converting BIRTHDATE to a number the value of BIRTHDATE displayed in the log is helpful.&amp;nbsp; It is showing the it is empty, so that is definitely does not represent a valid date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can prevent that note in two ways.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could first test if BIRTHDATE is empty and only execute the INPUT() function when it is not.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if not missing(birthdate) then birthdate_num=input(birthdate,mmddyy10.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or you could suppress ALL of the notes about invalid values by including the ?? modifier before the informat.&amp;nbsp; Then even if the value of BIRTHDATE is 'dawn of time' you won't get an invalid value NOTE.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;birthdate_num=input(birthdate,??mmddyy10.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 16:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-date-to-numeric-in-sas/m-p/927563#M365009</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-05-08T16:38:11Z</dc:date>
    </item>
  </channel>
</rss>

