<?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 string date to date format yyyy-mm-dd in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/converting-string-date-to-date-format-yyyy-mm-dd/m-p/968273#M45977</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here,s my data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;creationdate creationtime filesize&lt;BR /&gt;2024-09-11 14:41:09 112252063&lt;BR /&gt;2024-10-31 15:59:49 109152507&lt;BR /&gt;2024-10-31 15:59:49 556&lt;BR /&gt;2024-11-15 10:14:06 111706769&lt;BR /&gt;2025-01-07 10:02:14 112484453&lt;BR /&gt;2025-01-28 14:26:40 112503907&lt;BR /&gt;2025-05-01 15:15:33 1934&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data foldercontents2;
set foldercontents2;
crdate = input(trim(creationdate), mmddyy10.);
format crdate yymmdd10.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;crdate is empty&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jun 2025 16:14:44 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2025-06-05T16:14:44Z</dc:date>
    <item>
      <title>converting string date to date format yyyy-mm-dd</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/converting-string-date-to-date-format-yyyy-mm-dd/m-p/968273#M45977</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here,s my data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;creationdate creationtime filesize&lt;BR /&gt;2024-09-11 14:41:09 112252063&lt;BR /&gt;2024-10-31 15:59:49 109152507&lt;BR /&gt;2024-10-31 15:59:49 556&lt;BR /&gt;2024-11-15 10:14:06 111706769&lt;BR /&gt;2025-01-07 10:02:14 112484453&lt;BR /&gt;2025-01-28 14:26:40 112503907&lt;BR /&gt;2025-05-01 15:15:33 1934&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data foldercontents2;
set foldercontents2;
crdate = input(trim(creationdate), mmddyy10.);
format crdate yymmdd10.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;crdate is empty&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 16:14:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/converting-string-date-to-date-format-yyyy-mm-dd/m-p/968273#M45977</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2025-06-05T16:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: converting string date to date format yyyy-mm-dd</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/converting-string-date-to-date-format-yyyy-mm-dd/m-p/968280#M45978</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;The INFORMAT you use in your INPUT. statement MUST match what is contained in the character value you want to convert to numeric. You are making the new numeric variable CRDATE by using the INPUT function to turn the string '&lt;FONT color="#FF00FF"&gt;2024-11-15&lt;/FONT&gt;', etc, into a numeric value representing a SAS date value. You told the INPUT function that CREATIONDATE should be transformed using the INFORMAT mmddyy10. I'm not entirely sure you need TRIM, depending on whether the original variable has trailing spaces. However, your CREATIONDATE character string looks like it is YYYY-MM-DD on all the rows you gave as an example. So I think you need this: &lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;crdate = input(trim(creationdate), &lt;FONT color="#FF00FF"&gt;yymmdd10.&lt;/FONT&gt;);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 16:46:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/converting-string-date-to-date-format-yyyy-mm-dd/m-p/968280#M45978</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2025-06-05T16:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: converting string date to date format yyyy-mm-dd</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/converting-string-date-to-date-format-yyyy-mm-dd/m-p/968281#M45979</link>
      <description>&lt;P&gt;Why do you use an informat with&amp;nbsp;&lt;STRONG&gt;MDY&lt;/STRONG&gt; order when the date strings are in &lt;STRONG&gt;YMD&lt;/STRONG&gt; order?&lt;/P&gt;
&lt;P&gt;The correct informat should be YYMMDD10.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 16:50:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/converting-string-date-to-date-format-yyyy-mm-dd/m-p/968281#M45979</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-06-05T16:50:08Z</dc:date>
    </item>
  </channel>
</rss>

