<?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: SAS datetime informats friendly to excel in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204923#M51047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excel won't recognize numbers formatted with the SAS default date formats as dates. That is why 11FEB15 is read by Excel as a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom's method for building an Excel compatible format is a nice way to go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With "locale", I meant the regional setting of the system where Excel runs, because Excel will also use this setting for determining input types (ie when set to one of the German locales, 123.456.789,123 will be considered a number, which will not happen in any of the English locales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bill's suggestion of creating the correct value for Excel with a formula is also very neat, but you will need to set the correct format for the column in Excel.&lt;/P&gt;&lt;P&gt;Be aware that Excel has a problem with dates before March 1, 1900.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Apr 2015 06:02:33 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2015-04-29T06:02:33Z</dc:date>
    <item>
      <title>SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204915#M51039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking SAS date time informats that excel can easily translate.&lt;/P&gt;&lt;P&gt;Presently, the excel extracts generated from SAS can only be sorted as text.&lt;/P&gt;&lt;P&gt;I wish to be able to sort this in an ascending or a descending order as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 17:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204915#M51039</guid>
      <dc:creator>lyton80</dc:creator>
      <dc:date>2015-04-27T17:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204916#M51040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you mean "Format". A SAS Informat is used by SAS to read data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How are you exporting the data from SAS to Excel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you could likely sort it in SAS before / during the creation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 17:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204916#M51040</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-04-27T17:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204917#M51041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I meant format.&lt;/P&gt;&lt;P&gt;My goal is to use an excel friendly format so that any person can play with the extract I generate at anytime.&lt;/P&gt;&lt;P&gt;At the moment, my date-time fields can only be searched as text and not sorted. So my question is: is there any date-time format which is excel friendly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 22:39:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204917#M51041</guid>
      <dc:creator>lyton80</dc:creator>
      <dc:date>2015-04-27T22:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204918#M51042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some questions remain:&lt;/P&gt;&lt;P&gt;How do you do the export?&lt;/P&gt;&lt;P&gt;What is your Excel locale?&lt;/P&gt;&lt;P&gt;What format(s) are you currently using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 06:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204918#M51042</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-04-28T06:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204919#M51043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp file="xyz.xlsx" options=(sheet_name="data" autofilter=on);&lt;/P&gt;&lt;P&gt;proc report data=xyz;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column a date1 date2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a / "Text column";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date1 / "Date 1" &lt;CODE style="padding: 10px 0 8px;"&gt;{tagattr='TYPE:DateTime format:mm/dd/yy;@'};&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples given here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html" title="http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html"&gt;Base SAS: Demo: ExcelXP Tagset and Microsoft Excel&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 08:38:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204919#M51043</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-04-28T08:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204920#M51044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;How do you do the export?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;- I am using proc print imbeded with a&amp;nbsp; "ods cvs="statement&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;What is your Excel locale?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;- locale?? I am exporting to a folder on my desktop. Hoping I have understood your question.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;What format(s) are you currently using?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I am using datetime. formats and anydtdtm40. informats to read the dates into SAS.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;This is how it appears in the excel sheet: &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 340px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="340"&gt;11FEB15:12:22:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;This cannot be sorted in an ascending or a descending order in excel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 16:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204920#M51044</guid>
      <dc:creator>lyton80</dc:creator>
      <dc:date>2015-04-28T16:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204921#M51045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For DATE use YYMMDD10. instead of DATE9. ;&lt;/P&gt;&lt;P&gt;TIME formats should work fine.&lt;/P&gt;&lt;P&gt;For DATETIME&amp;nbsp; I have found that this PICTURE format works well.&amp;nbsp; You might want to set different LOW limit to reflect the limitations of SAS and Excel support for old dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc format lib=WORK ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; picture EXCELDT low-high = "%Y-%0m-%0d %0H:%0M:%0S" (datatype = datetime) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 18:09:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204921#M51045</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-04-28T18:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204922#M51046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not build a Microsoft date from the SASdate?&lt;/P&gt;&lt;P&gt;MSDate=SASdate+21916;**Build microsoft date serial;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 20:03:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204922#M51046</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2015-04-28T20:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204923#M51047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excel won't recognize numbers formatted with the SAS default date formats as dates. That is why 11FEB15 is read by Excel as a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom's method for building an Excel compatible format is a nice way to go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With "locale", I meant the regional setting of the system where Excel runs, because Excel will also use this setting for determining input types (ie when set to one of the German locales, 123.456.789,123 will be considered a number, which will not happen in any of the English locales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bill's suggestion of creating the correct value for Excel with a formula is also very neat, but you will need to set the correct format for the column in Excel.&lt;/P&gt;&lt;P&gt;Be aware that Excel has a problem with dates before March 1, 1900.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 06:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204923#M51047</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-04-29T06:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204924#M51048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a completely different option that can be applied after your SAS datetime default has arrived in excel, consider an excel formula like &lt;/P&gt;&lt;P&gt;'=datevalue(left(##,9))+timevalue(right(##,8))&lt;/P&gt;&lt;P&gt;where ## is cell reference to the datetime string. &lt;/P&gt;&lt;P&gt;Of course I normally choose a method like Tom's&lt;/P&gt;&lt;P&gt;but often find it is too late or limited by others and enterprise guide ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PeterC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 06:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204924#M51048</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2015-05-06T06:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204925#M51049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a number to add to a datetime that gives a similar result? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 14:47:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204925#M51049</guid>
      <dc:creator>S_Nav</dc:creator>
      <dc:date>2015-06-15T14:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS datetime informats friendly to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204926#M51050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try '01jan1960:00:00:00'dt - '31dec1899:00:00:00'dt&lt;/P&gt;&lt;P&gt;31dec1899 as Excel incorrectly views 1900 as a leapyear.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 18:35:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-datetime-informats-friendly-to-excel/m-p/204926#M51050</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-06-15T18:35:24Z</dc:date>
    </item>
  </channel>
</rss>

