<?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 Date Format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/508244#M136472</link>
    <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;i have a date and time data in character format how can i convert them to numeric in datastep&lt;/P&gt;&lt;P&gt;data sample;&lt;/P&gt;&lt;P&gt;input datetime $ 16.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;01-10-2018t10:15&lt;/P&gt;&lt;P&gt;01-10-2018t10:20&lt;/P&gt;&lt;P&gt;01-10-2018t10:20&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;date should be in date9 format and time should be in time5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help me friend..&lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2018 06:10:33 GMT</pubDate>
    <dc:creator>ravindra2</dc:creator>
    <dc:date>2018-10-29T06:10:33Z</dc:date>
    <item>
      <title>Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/508244#M136472</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;i have a date and time data in character format how can i convert them to numeric in datastep&lt;/P&gt;&lt;P&gt;data sample;&lt;/P&gt;&lt;P&gt;input datetime $ 16.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;01-10-2018t10:15&lt;/P&gt;&lt;P&gt;01-10-2018t10:20&lt;/P&gt;&lt;P&gt;01-10-2018t10:20&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;date should be in date9 format and time should be in time5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help me friend..&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 06:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/508244#M136472</guid>
      <dc:creator>ravindra2</dc:creator>
      <dc:date>2018-10-29T06:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/508245#M136473</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  input datetime $ 16.;
  date = input(substr(datetime,1,10),ddmmyy10.);&lt;BR /&gt;  time = input(substr(datetime,12,5),time5.);&lt;BR /&gt;  format date date9. time time5.;
cards;
01-10-2018t10:15
01-10-2018t10:20
01-10-2018t10:20
;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Oct 2018 06:29:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/508245#M136473</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-10-29T06:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/508249#M136474</link>
      <description>Thank you its working&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Oct 2018 06:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/508249#M136474</guid>
      <dc:creator>ravindra2</dc:creator>
      <dc:date>2018-10-29T06:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/508267#M136483</link>
      <description>&lt;P&gt;Sorry, why do you have datetimes in that format in the first place.&amp;nbsp; It looks to me like a data error.&amp;nbsp; The T indicates that its an ISO date, however the format of ISOdates are:&lt;/P&gt;
&lt;P&gt;YYYY-MM-DDTHH:MM&lt;/P&gt;
&lt;P&gt;(Plus of course all the seconds, time zone etc.).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now your data has that kind of form but is all the wrong way round.&amp;nbsp; Go back to source and get it fixed.&amp;nbsp; This should be in your data transfer agreement/spec, otherwise you could be in all kinds of difficulties, e.g.&lt;/P&gt;
&lt;P&gt;01-10-2018t10:15&lt;/P&gt;
&lt;P&gt;10-01-2018t10:20&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are they both 01Oct, or is the second 10Jan?&amp;nbsp; Proper data formatting is key foundation in programming.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 08:41:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/508267#M136483</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-29T08:41:31Z</dc:date>
    </item>
  </channel>
</rss>

