<?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: Need Date formatting code while exporting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195678#M266474</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madam,&lt;/P&gt;&lt;P&gt;Thanks for the reply.I did not understand your code.&lt;SPAN style="line-height: 1.5em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;The date has the format of : &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #f8f8f8;"&gt;04/04/2014...but when I export ,date format is different.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I assign a=41235, then it's difficult to assign for all the values,right? Can you please elaborate your code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Jul 2015 11:52:48 GMT</pubDate>
    <dc:creator>Sandeepkumar</dc:creator>
    <dc:date>2015-07-04T11:52:48Z</dc:date>
    <item>
      <title>Need Date formatting code while exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195673#M266469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on the number of ticket bookings of a flight.I have the different number of bookings&amp;nbsp; in one day at different time points and I have written the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt; create table new as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select date,sum(TOTAL_BOOKINGS_IN_CABIN) as neww&amp;nbsp; from boo&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by date;&lt;/P&gt;&lt;P&gt; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I export this dataset called "new", then I am not getting the date column as in the date format (mm/dd/yyyy).It is giving as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;41235&lt;/P&gt;&lt;P&gt;41236&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the date as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;04/04/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;02/05/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;...... and so on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Can someone pls help me on this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Sandeep&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 06:41:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195673#M266469</guid>
      <dc:creator>Sandeepkumar</dc:creator>
      <dc:date>2015-07-04T06:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need Date formatting code while exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195674#M266470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;a=41235;&lt;/P&gt;&lt;P&gt;put a&amp;nbsp; mmddyys10.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 08:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195674#M266470</guid>
      <dc:creator>mingfeng07</dc:creator>
      <dc:date>2015-07-04T08:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need Date formatting code while exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195675#M266471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you export?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 10:33:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195675#M266471</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-07-04T10:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need Date formatting code while exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195676#M266472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does your date have a format ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc sql;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;create table new as&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; select date &lt;STRONG&gt;format=mmddyy10.&lt;/STRONG&gt; ,sum(TOTAL_BOOKINGS_IN_CABIN) as neww&amp;nbsp; from boo&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; group by date;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 10:53:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195676#M266472</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-07-04T10:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need Date formatting code while exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195677#M266473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Yes,the date has the format of : &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px; background-color: #f8f8f8;"&gt;04/04/2014......&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px; background-color: #f8f8f8;"&gt;I tried your code but it didn't work.I was exporting through the menu driven option(manually).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please let me know if i miss something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 11:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195677#M266473</guid>
      <dc:creator>Sandeepkumar</dc:creator>
      <dc:date>2015-07-04T11:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need Date formatting code while exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195678#M266474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madam,&lt;/P&gt;&lt;P&gt;Thanks for the reply.I did not understand your code.&lt;SPAN style="line-height: 1.5em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;The date has the format of : &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #f8f8f8;"&gt;04/04/2014...but when I export ,date format is different.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I assign a=41235, then it's difficult to assign for all the values,right? Can you please elaborate your code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 11:52:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195678#M266474</guid>
      <dc:creator>Sandeepkumar</dc:creator>
      <dc:date>2015-07-04T11:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need Date formatting code while exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195679#M266475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Export it to what ? CSV ,EXCEL ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 12:06:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195679#M266475</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-07-04T12:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need Date formatting code while exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195680#M266476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it didn't work out.&lt;/P&gt;&lt;P&gt;Try to change date into character type variable :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Does your date have a format ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc sql;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;create table new as&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; select '09'x||put(date,mmddyy10. -l)&amp;nbsp; as d&amp;nbsp; ,sum(TOTAL_BOOKINGS_IN_CABIN) as neww&amp;nbsp; from boo&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; group by date;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 12:22:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195680#M266476</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-07-04T12:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need Date formatting code while exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195681#M266477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, I am sorry to tell you that I'm a Sir, and then I 'm wonder that where do you want to export? I can give you a example as follows:&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;a=1;&lt;/P&gt;&lt;P&gt;format a mmddyys10.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc export outfile="C:\Users\Pactera\Desktop\test.txt" dbms=tab replace;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;And the results is as following:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="捕获.PNG" class="jive-image" src="https://communities.sas.com/legacyfs/online/11087_捕获.PNG" /&gt;&lt;/P&gt;&lt;P&gt;So, you can see that the results' format is what you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 12:35:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Date-formatting-code-while-exporting/m-p/195681#M266477</guid>
      <dc:creator>mingfeng07</dc:creator>
      <dc:date>2015-07-04T12:35:41Z</dc:date>
    </item>
  </channel>
</rss>

