<?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 Re: DateTime correction in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DateTime-correction/m-p/817332#M322625</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;EffectiveWithdrawDate = '15APR2015:00:00:00.000';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;makes EffectiveWithdrawData a character string. It should be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;EffectiveWithdrawDate = '15APR2015:00:00:00.000'dt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and now EffectiveWithdrawData is a SAS date/time value, which is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, if you want a variable to be numeric and have length of 8, you don't have to do anything, 8 is the default.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jun 2022 17:16:15 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-06-09T17:16:15Z</dc:date>
    <item>
      <title>DateTime correction</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DateTime-correction/m-p/817331#M322624</link>
      <description>&lt;P&gt;Hi....I am trying to correct a EffectiveWithdrawDate on a student record and I am getting an "Invalid numeric data". I tried double quotes around the datetime and get an error message. Any suggestion on how to deal with this.....Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Program (3)';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='';
6          %LET _CLIENTPROJECTPATHHOST='';
7          %LET _CLIENTPROJECTNAME='';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=PNG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGSR TEMP;
15         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16             STYLE=HTMLBlue
17             STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
18             NOGTITLE
19             NOGFOOTNOTE
20             GPATH=&amp;amp;sasworklocation
21             ENCODING=UTF8
22             options(rolap="on")
23         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24         
25         GOPTIONS ACCESSIBLE;
26         
27         data DropBag1;
28         	length DropBagID 8 StudentUID 8 TermCalendarID 8 Department $ 5 CourseID $ 5 CourseType $ 5 Section $ 5 CourseName $ 60
28       ! CollegeID 8 Credits 8 Grade $ 5 LastUpdate 8 EffectsTermGPA $ 3 EffectsCumGPA $ 3 CategoryID 8 GradePoint 8 CreditFactor
28       ! 8 TermEarned 8 CumulativeEarned 8 TermGPAHours 8 CumulativeGPAHours 8
29                     MidTermGrade $ 2 MidTermPoints 8 ShowGradeReport $ 3 ShowTranscript $ 3 OverallGradePoint 8
29       ! OverallCreditFactor 8 ShowAdvisorTranscript $ 3 GPAGroupID 8 RegistrationStatus $ 40 ClockHours 8 StartDate 8
29       ! CompletionDate 8 FacultyID 8 PreviousGrade $ 2 StartInputDate 8 CompletionInputDate 8 IgnoreRepeats $ 3
30                     Repeat $ 3 TranscriptATTHours 8 TranscriptERNHours $ 3 EffectiveRegDate 8 DropUserID $ 15 DropTime 8
30       ! SracademicID 8 SrofferID 8 MatchSRMasterID 8 IncludeHopeGPA 8 WritingIntensive 8 Honors 8 NumberGradeFinal 8
30       ! NumberGradeMidTerm 8 EffectiveAddDate 8 EffectiveWithdrawDate 8;
31             format Department $char5. CourseID $char5. CourseType $char5. Section	$char5. CourseName $char60. Grade $char5.
31       ! LastUpdate DATETIME20. EffectsTermGPA $char3. EffectsCumGPA $char3. MidTermGrade $char2. ShowGradeReport $char3.
31       ! ShowTranscript $char3. ShowAdvisorTranscript $char3. RegistrationStatus $char40.
32                     StartDate DATETIME22.3 CompletionDate DATETIME22.3 StartInputDate DATETIME22.3 CompletionInputDate
32       ! DATETIME22.3 IgnoreRepeats $char3. Repeat $char3. TranscriptERNHours $char3. EffectiveRegDate DATETIME22.3
32       ! DropUserID	$char15. DropTime DATETIME22.3 EffectiveAddDate DATETIME22.3 EffectiveWithdrawDate DATETIME22.3;
33         	set sqldb.DropBag;
34                 if StudentUID in (13125) and TermCalendarID in (104) and Department in ('NCT') then do;
35                     CourseName = 'Cisco Level II';
36                     EffectiveWithdrawDate = '15APR2015:00:00:00.000';
37                 end;
38         run;

NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).
      36:37   
NOTE: Invalid numeric data, '15APR2015:00:00:00.000' , at line 36 column 37.
DropBagID=17617 StudentUID=13125 TermCalendarID=104 Department=NCT CourseID=060 CourseType=40S Section=CECP3
CourseName=Cisco Level II CollegeID=0 Credits=1 Grade=  LastUpdate=30MAR2015:16:04:00 EffectsTermGPA=Yes EffectsCumGPA=Yes
CategoryID=1099 GradePoint=0 CreditFactor=0 TermEarned=0 CumulativeEarned=0 TermGPAHours=0 CumulativeGPAHours=0 MidTermGrade= 
MidTermPoints=0 ShowGradeReport=Yes ShowTranscript=Yes OverallGradePoint=0 OverallCreditFactor=0 ShowAdvisorTranscript=Yes
GPAGroupID=0 RegistrationStatus=Official ClockHours=0 StartDate=10FEB2015:00:00:00.000 CompletionDate=16APR2015:00:00:00.000
2                                                          The SAS System                               11:02 Thursday, June 9, 2022

FacultyID=0 PreviousGrade=  StartInputDate=. CompletionInputDate=. IgnoreRepeats=No Repeat=No TranscriptATTHours=1
TranscriptERNHours=Yes EffectiveRegDate=15APR2015:00:00:00.000 DropUserID=PENHEC DropTime=15APR2015:14:19:00.000
SracademicID=1213294 SrofferID=24691 MatchSRMasterID=. IncludeHopeGPA=1 WritingIntensive=0 Honors=0 NumberGradeFinal=.
NumberGradeMidTerm=. EffectiveAddDate=10FEB2015:16:03:55.000 EffectiveWithdrawDate=. _ERROR_=1 _N_=842&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jun 2022 17:13:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DateTime-correction/m-p/817331#M322624</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2022-06-09T17:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime correction</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DateTime-correction/m-p/817332#M322625</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;EffectiveWithdrawDate = '15APR2015:00:00:00.000';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;makes EffectiveWithdrawData a character string. It should be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;EffectiveWithdrawDate = '15APR2015:00:00:00.000'dt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and now EffectiveWithdrawData is a SAS date/time value, which is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, if you want a variable to be numeric and have length of 8, you don't have to do anything, 8 is the default.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 17:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DateTime-correction/m-p/817332#M322625</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-09T17:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime correction</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DateTime-correction/m-p/817333#M322626</link>
      <description>Thanks Paige.....that fixed the problem and thanks for the information about numeric variables.</description>
      <pubDate>Thu, 09 Jun 2022 17:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DateTime-correction/m-p/817333#M322626</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2022-06-09T17:37:21Z</dc:date>
    </item>
  </channel>
</rss>

