<?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 format into Excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173224#M33265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an old note explaining about using the TAGATTR feature to tell Excel how to format the dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/38/143.html" title="http://support.sas.com/kb/38/143.html"&gt;38143 - Apply date formats with the ExcelXP destination&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jan 2015 20:37:03 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-01-07T20:37:03Z</dc:date>
    <item>
      <title>Datetime format into Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173223#M33264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS newbie here--I am putting together an Excel spreadsheet via the ods tagsets.excelxp method. I have been searching online, but I have not yet found a way to display a datetime in a way that Excel would recognize as a datetime. My Excel spreadsheet currently displays (for example) 06JAN2015:07:39:37, when ideally, I would like it to read 01/06/2015 07:39 (24-hr format). Is there a datetime format that would allow me to do this? If not, what is the best way to go about this? I stumbled upon datepart and timepart functions, so the best I can think of for now is to concatenate those together, but I would be interested to know if there are other methods out there. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 19:32:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173223#M33264</guid>
      <dc:creator>kgot</dc:creator>
      <dc:date>2015-01-07T19:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime format into Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173224#M33265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an old note explaining about using the TAGATTR feature to tell Excel how to format the dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/38/143.html" title="http://support.sas.com/kb/38/143.html"&gt;38143 - Apply date formats with the ExcelXP destination&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 20:37:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173224#M33265</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-01-07T20:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime format into Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173225#M33266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Tom--that worked perfectly for my proc print statements. I am only having difficulty with a proc report--it does not seem that tagattr is an option for that--is there a way to do the same thing in a proc report?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 21:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173225#M33266</guid>
      <dc:creator>kgot</dc:creator>
      <dc:date>2015-01-08T21:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime format into Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173226#M33267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's an example of proc report and tagattr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.shoes(obs=10) nowd ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title 'Using tagattr and TAGSETS.EXCELXP';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title2 'Send a Formula for a Column';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column region product sales profit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define region/display;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define product /display;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sales/ sum 'Sales'&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={tagattr="$###,##0.00"};&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define profit / computed "Profit"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {tagattr='Formula:RC[-1]*0.9'};&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute profit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** profit is not in sashelp.shoes;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** so make an empty column for the formula;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; profit = 0;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 22:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173226#M33267</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-01-08T22:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime format into Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173227#M33268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it--that worked! I was trying to use just "style" instead of "style(column)"--once I changed that, it worked perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you to both of you--I really appreciate it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 12:54:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datetime-format-into-Excel/m-p/173227#M33268</guid>
      <dc:creator>kgot</dc:creator>
      <dc:date>2015-01-09T12:54:00Z</dc:date>
    </item>
  </channel>
</rss>

