<?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: How can I convert an alpha data (20081223) that represents a date, into a numerical for excel purposes in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122025#M10101</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt; a='20081223';&lt;/P&gt;&lt;P&gt; b=input(a,yymmdd8.);&lt;/P&gt;&lt;P&gt; format b ddmmyyd10.;&lt;/P&gt;&lt;P&gt; proc print;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Sep 2012 15:14:45 GMT</pubDate>
    <dc:creator>Linlin</dc:creator>
    <dc:date>2012-09-14T15:14:45Z</dc:date>
    <item>
      <title>How can I convert an alpha data (20081223) that represents a date, into a numerical for excel purposes</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122023#M10099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alphanumerical data is : 20081223&lt;/P&gt;&lt;P&gt;Numerical should read : 39805 the Excel equivalent of 2008-12-23&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 14:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122023#M10099</guid>
      <dc:creator>dominicrb</dc:creator>
      <dc:date>2012-09-14T14:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert an alpha data (20081223) that represents a date, into a numerical for excel purposes</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122024#M10100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We should probably have more context.&amp;nbsp; Do you want to do this using the point and click interface in EGuide (e.g. Query Builder) or can you write code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, you want to use a function, and informat, and a format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INPUT(alphanum,yyyymmdd8.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will bring the data into a numeric variable as a SAS date (that can be done in code or as a data transformation in the Advanced Expression builder).&amp;nbsp; The INPUT function reads a character field into a numeric data field using the specified format.&amp;nbsp; RTFM for more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then apply the &lt;/P&gt;&lt;P&gt;mmddyyyy-10.&lt;/P&gt;&lt;P&gt;format to get it to display the way you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are large sections on reading and writing dates in the reference manuals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 15:12:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122024#M10100</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2012-09-14T15:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert an alpha data (20081223) that represents a date, into a numerical for excel purposes</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122025#M10101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt; a='20081223';&lt;/P&gt;&lt;P&gt; b=input(a,yymmdd8.);&lt;/P&gt;&lt;P&gt; format b ddmmyyd10.;&lt;/P&gt;&lt;P&gt; proc print;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 15:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122025#M10101</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-09-14T15:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert an alpha data (20081223) that represents a date, into a numerical for excel purposes</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122026#M10102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm actually writting the code. I would like to export the results in Excel where instead of having an alphanumerical number like '20080223' I would actually have the numerical equivalent in Excel (39805) that is for 23 of febuary 2008 (Starting date = 1900).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CREATE TABLE work.date AS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT&amp;nbsp; t1.account_number, t1.opening_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM client AS t1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE t1.opening_date NOT = ' ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 15:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122026#M10102</guid>
      <dc:creator>dominicrb</dc:creator>
      <dc:date>2012-09-14T15:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert an alpha data (20081223) that represents a date, into a numerical for excel purposes</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122027#M10103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN lang="EN"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Asof=&amp;nbsp; convert '20081223' into a SAS date value ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AS_Of=(int(asof/86400) + 21916) + ((asof-(int(asof/86400)*86400))/86400);**Build microsoft date serial;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where 86400=seconds per day, 21916 is the offset difference between day 0 in SAS and day 0 in ms&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 15:55:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122027#M10103</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2012-09-14T15:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert an alpha data (20081223) that represents a date, into a numerical for excel purposes</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122028#M10104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... are you sure about that date value (39805) ... SAS "thinks" that there are 39499 days between a base day of 1/1/1900 and 2/23/2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data _null_;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;a='01jan1900'd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;b='23feb2008'd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;c = b-a;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;d = intck('days',a,b);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;put a/b/c/d;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;format a b date9.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;01JAN1900&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;23FEB2008&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;39499&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;39499&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;assuming it really is 39499, then ...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data client;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input account_number :$5. opening_date :$8.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;00001 19000101&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;00002 19600101&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;12345 20080223&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;select&amp;nbsp; t1.account_number, t1.opening_date as faux_date,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input(t1.opening_date,yymmdd8.)+21914 as opening_date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;from client as t1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;where ^missing(t1.opening_date);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;account_&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; faux_date&amp;nbsp; opening_date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;00001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19000101&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;00002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19600101&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21914&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;12345&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20080223&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 39499&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 16:08:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122028#M10104</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-09-14T16:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert an alpha data (20081223) that represents a date, into a numerical for excel purposes</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122029#M10105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Who knew that Excel dates were so wonky? I had always used a fudge factor of 21916 to adjust from the Excel date to the SAS date. I think I did it based on this paper:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi29/068-29.pdf"&gt;http://www2.sas.com/proceedings/sugi29/068-29.pdf&lt;/A&gt;&amp;nbsp; says the "fudge factor" is 21916 but doesn't explain why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; But when Bill used 21916 and Mike recommended 21914, I thought, hmmm, I wonder why the 2 different dates. So then, I found this: &lt;A href="http://www.sascommunity.org/wiki/Tips:Conversion_from_Excel_Date_to_SAS_Date"&gt;http://www.sascommunity.org/wiki/Tips:Conversion_from_Excel_Date_to_SAS_Date&lt;/A&gt;&lt;/P&gt;&lt;P&gt;that explains you have to check whether Microsoft is using the 1900 date system or the 1904 date system. And then Microsoft had something to say about 1900 vs 1904:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.microsoft.com/kb/180162"&gt;http://support.microsoft.com/kb/180162&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and&lt;BR /&gt;&lt;A class="active_link" href="http://support.microsoft.com/kb/214058"&gt;http://support.microsoft.com/kb/214058&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then I read some more and it comes down to this: apparently, Lotus 123 was off because they thought 1900 was a leap year and Excel wanted to be able to read Lotus123 files. So they adopted the same error. But that only impacts the first 2 months of 1900. See below...Excel treats 2/29/1900 as a valid date value. And, Excel starts at 1, for Jan 1, 1900 (not at 0).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; In looking at it a bit more, I think that the fudge factor is a bit more complicated than a single number. I went to Excel and typed in numbers from 0 to 60 and then put in some other dates like Jan 1, 1960 and a date value from 1984. Then I copied that column of numbers and formatted it as date values, using Excel date formats (not any SAS). Then I took that same list of numbers and found out what the SAS numbers were and typed those in. So, I just used pure Excel to type in the spreadsheet. Imagine my surprise when the number 0 became Jan &lt;STRONG&gt;0&lt;/STRONG&gt;, 1900 -- interesting, wonky, but interesting. And then, 60 became Feb &lt;STRONG&gt;29&lt;/STRONG&gt;, 1900, which is invalid in SAS because 1900 was not a leap year. And, March 1, 1900 in Excel is the number 61.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here's the short scoop on what I discovered after I took the dates and got the SAS numbers for each date:&lt;/P&gt;&lt;P&gt;Dec 31,1899 is not allowed in Excel but&amp;nbsp; -21915 in SAS is 12/31/1899. But Excel dates start at Jan 1, 1960. well, sort of.&lt;/P&gt;&lt;P&gt;Jan 0, 1900 in Excel is number 0 and this is an invalid date in SAS, So there is no equivalent SAS number for Jan 0&lt;/P&gt;&lt;P&gt;Jan 1, 1900 in Excel is 1 and in SAS is -21914&amp;nbsp;&amp;nbsp; ( So Microsoft does &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;NOT&lt;/STRONG&gt;&lt;/SPAN&gt; really have a date 0. Jan 1, 1900 is the number 1.)&lt;/P&gt;&lt;P&gt;Feb 28, 1900 in Excel is 59 and in SAS is -21856&lt;/P&gt;&lt;P&gt;Feb 29,1900 in Excel is 60 and is invalid an invalid date in SAS, so there is no equivalent number&lt;/P&gt;&lt;P&gt;March 1, 1900 in Excel is 61 and in SAS is -21855&lt;/P&gt;&lt;P&gt;Jan 1, 1960 in Excel is 21916 and in SAS is 0&lt;/P&gt;&lt;P&gt;Jan 2, 1960 in Excel is 21917 and in SAS is 1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So it looks to me like AFTER March 1, 1900, the fudge factor is 21916, but that BEFORE March 1, 1900, the "fudge factor" is 21915 -- which you would only care about if your dates went back that far.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Interesting stuff.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;cynthia&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11693i4AC4616FF355F871/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="interesting_excel_dates.png" title="interesting_excel_dates.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2012 20:37:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-I-convert-an-alpha-data-20081223-that-represents-a-date/m-p/122029#M10105</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-09-15T20:37:32Z</dc:date>
    </item>
  </channel>
</rss>

