<?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 convertion in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889629#M351504</link>
    <description>&lt;P&gt;I'm doning a select from a table in a proc sql and I just want to convert&amp;nbsp;&lt;STRONG&gt;04Apr2023 09:51:00 into&amp;nbsp;04/04/2023 09:51:00&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;dd/mm/yyyy hh:mm:ss, if I use a datepart with a format ddmmyy10. I lose the time, and I don't want to lose the time.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2023 11:00:59 GMT</pubDate>
    <dc:creator>Jose7</dc:creator>
    <dc:date>2023-08-17T11:00:59Z</dc:date>
    <item>
      <title>Datetime convertion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889575#M351484</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this format date:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;04Apr2023 9:51:00&lt;/STRONG&gt;&amp;nbsp; and I want to convert into this format, keeping the time&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;04/04/2023 9:51:00&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you known any format type I could use?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 00:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889575#M351484</guid>
      <dc:creator>Jose7</dc:creator>
      <dc:date>2023-08-17T00:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime convertion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889576#M351485</link>
      <description>&lt;P&gt;You show an hour with no leading 0. do you want minutes with no leading 0? How about Seconds if there is only one digit worth?&lt;/P&gt;
&lt;P&gt;You picked a bad date as the example. I can't tell if you actually want a month/day/year order or day/month/year.&lt;/P&gt;
&lt;P&gt;Do you want 00:00:00 for midnight or 24:00:00? Are times after noon 1:00:00 or 13:00:00 ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Format will let you roll pretty much any date, time or datetime format that you want but a clear description of what goes into each position is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will make format that displays the date in Month/day/year order with leading 0 for months or days of the month &amp;lt; 10, uses a 00:00:00 to 23:59:59 clock value and shows the leading 0 for hours, minutes and seconds when &amp;lt; 10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format;
picture mydt
low-high='%0m/%0d/%Y %0H:%0M:%0S' (datatype=datetime)
;
run;&lt;/PRE&gt;
&lt;P&gt;All those %0lettter combinations are directives for displaying date and time elements. You do want to use single quotes here as double quotes will get the % interpreted by the macro processor and not in a good way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 01:31:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889576#M351485</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-08-17T01:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime convertion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889629#M351504</link>
      <description>&lt;P&gt;I'm doning a select from a table in a proc sql and I just want to convert&amp;nbsp;&lt;STRONG&gt;04Apr2023 09:51:00 into&amp;nbsp;04/04/2023 09:51:00&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;dd/mm/yyyy hh:mm:ss, if I use a datepart with a format ddmmyy10. I lose the time, and I don't want to lose the time.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 11:00:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889629#M351504</guid>
      <dc:creator>Jose7</dc:creator>
      <dc:date>2023-08-17T11:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime convertion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889631#M351505</link>
      <description>&lt;P&gt;No need to convert, just use a proper format.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 11:26:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889631#M351505</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-17T11:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime convertion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889633#M351507</link>
      <description>Do you know where I can find de proper format?</description>
      <pubDate>Thu, 17 Aug 2023 11:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889633#M351507</guid>
      <dc:creator>Jose7</dc:creator>
      <dc:date>2023-08-17T11:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime convertion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889634#M351508</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;has already shown how to create one yourself.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 11:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889634#M351508</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-17T11:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime convertion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889643#M351512</link>
      <description>Thks so much for your help, It works fine!</description>
      <pubDate>Thu, 17 Aug 2023 13:13:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889643#M351512</guid>
      <dc:creator>Jose7</dc:creator>
      <dc:date>2023-08-17T13:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime convertion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889645#M351513</link>
      <description>I Had not understood, sorry, now I tried it and it works wonderful, thanks to clear the topic</description>
      <pubDate>Thu, 17 Aug 2023 13:15:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-convertion/m-p/889645#M351513</guid>
      <dc:creator>Jose7</dc:creator>
      <dc:date>2023-08-17T13:15:06Z</dc:date>
    </item>
  </channel>
</rss>

