<?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 to generate zodiac sign based on dd-mm-yyyy birthdates in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110392#M9438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could also defined a character format (Call it $MD2SIGN.)&amp;nbsp; to convert from MMDD values to Zodiak sign.&lt;/P&gt;&lt;P&gt;Then you could calculate the sign using this simple statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sign = put(put(dob,mmddyy4.),$md2sign.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is SAS code to generate the format.&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; value $md2sign&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0321' - '0419' = 'Aries'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0420' - '0520' = 'Taurus'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0521' - '0620' = 'Gemini'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0621' - '0722' = 'Cancer'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0723' - '0822' = 'Leo'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0823' - '0922' = 'Virgo'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0923' - '1022' = 'Libra'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '1023' - '1121' = 'Scorpio'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '1122' - '1221' = 'Sagittarious'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '1222' - '1231'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; ,'0101' - '0119' = 'Capricorn'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0120' - '0218' = 'Aquarius'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0219' - '0320' = 'Pisces'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; other = 'Unknown'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Feb 2013 23:49:40 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2013-02-17T23:49:40Z</dc:date>
    <item>
      <title>how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110383#M9429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was hoping anyone could help me to generate within the Enterprise Guide recoded column function, the zodiac sign base on dd-mm-yyyy birthdates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should i breakdown the dates in Month(x), Day(x)? How can generate a code within the generate new column options?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aries&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;&amp;nbsp; March 21 - April 19&lt;/P&gt;&lt;P&gt;Taurus&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April&amp;nbsp; 20 - May 20&lt;/P&gt;&lt;P&gt;Gemini&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; May 21 - June 20&lt;/P&gt;&lt;P&gt;Cancer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; June 21 - July 22&lt;/P&gt;&lt;P&gt;Leo&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; July 23 - August 22&lt;/P&gt;&lt;P&gt;Virgo&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;&amp;nbsp; August 23 - September 22&lt;/P&gt;&lt;P&gt;Libra&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;&amp;nbsp; September 23 - October 22&lt;/P&gt;&lt;P&gt;Scorpio&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; October 23 - November 21&lt;/P&gt;&lt;P&gt;Sagittarius&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; November 22 - December 21&lt;/P&gt;&lt;P&gt;Capricorn&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; December 22 - January 19&lt;/P&gt;&lt;P&gt;Aquarius&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; January 20 - February 18&lt;/P&gt;&lt;P&gt;Pisces&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; February 19 - March 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 19:21:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110383#M9429</guid>
      <dc:creator>CesarOmarHR</dc:creator>
      <dc:date>2013-02-14T19:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110384#M9430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this blog post I show an approach that uses SAS formats to map dates to Zodiac signs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://blogs.sas.com/content/sasdummy/2011/09/13/whats-our-sign/" title="http://blogs.sas.com/content/sasdummy/2011/09/13/whats-our-sign/"&gt; What&amp;amp;#8217;s our sign? - The SAS Dummy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't translate exactly to Query Builder, but you could:&lt;/P&gt;&lt;P&gt;- run the code to define the format&lt;/P&gt;&lt;P&gt;- use Query Builder to recode the date to the range the format expects (Mon, Day, Year=2000)&lt;/P&gt;&lt;P&gt;- apply the format to the new column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 19:36:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110384#M9430</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-02-14T19:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110385#M9431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! I'm starting to understand how to generate the dates, however, i deal with an infinite amount of birthdate years, which should be taken into account in the formula and don't have knowledge of.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 19:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110385#M9431</guid>
      <dc:creator>CesarOmarHR</dc:creator>
      <dc:date>2013-02-14T19:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110386#M9432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cesar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why you need to recode the dates for use with the format -- take the Year out of the equation.&amp;nbsp; Zodiac signs don't change from year-to-year (do they?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Query Builder, compute a new column based on the date value, with the month, day, and a fixed year.&amp;nbsp; I used Year 2000 because it was a leap year and accounts for Feb 29.&amp;nbsp; Here's an expression you can use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;mdy(month(t1.date),day(t1.date),2000)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then apply the &lt;STRONG&gt;sign.&lt;/STRONG&gt; format in the column properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following: complete program that shows it in action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;/* SAS format for zodiac signs in a given year */&lt;/SPAN&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; value sign&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '21Mar2000'd - '19Apr2000'd = 'Aries'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '20Apr2000'd - '20May2000'd = 'Taurus'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '21May2000'd - '20Jun2000'd = 'Gemini'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '21Jun2000'd - '22Jul2000'd = 'Cancer'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '23Jul2000'd - '22Aug2000'd = 'Leo'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '23Aug2000'd - '22Sep2000'd = 'Virgo'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '23Sep2000'd - '22Oct2000'd = 'Libra'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '23Oct2000'd - '21Nov2000'd = 'Scorpio'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '22Nov2000'd - '21Dec2000'd = 'Sagittarious'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; /* split Capricorn to make two valid ranges */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; /* that don't span the calendar boundary */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '22Dec2000'd - '31Dec2000'd = 'Capricorn'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '01Jan2000'd - '19Jan2000'd = 'Capricorn'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '20Jan2000'd - '18Feb2000'd = 'Aquarius'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; '19Feb2000'd - '20Mar2000'd = 'Pisces'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; other = 'Unknown';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc sql;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; select air, date format=date9.,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; mdy(month(date),day(date),2000) as sign format=sign.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; from sashelp.air;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="3097" alt="signs.PNG" class="jive-image" src="https://communities.sas.com/legacyfs/online/3097_signs.PNG" /&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(updated with image of results)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 20:11:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110386#M9432</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-02-14T20:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110387#M9433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A href="mailto:Chris@SAS"&gt;Chris@SAS&lt;/A&gt;, i'll create the format as you suggest. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 22:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110387#M9433</guid>
      <dc:creator>CesarOmarHR</dc:creator>
      <dc:date>2013-02-14T22:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110388#M9434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" href="https://communities.sas.com/mailto:Chris@SAS/"&gt;Chris@SAS&lt;/A&gt; I'm creating the format to apply the zodiac signs but i'm having trouble getting SAS EG to approve it.&lt;/P&gt;&lt;P&gt;Here i show the specifications i'm using, i though i was writing the dates correctly. I've tried two ways: 01Jan2000'd - 20Jan2000'd and '01Jan2000'd - '20Jan2000'd, but SAS EG is no approving neither of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="3100" alt="Create Format.GIF" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3100_Create Format.GIF" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="3099" alt="Create Format B.GIF" class="jive-image-thumbnail jive-image jiveImage" src="https://communities.sas.com/legacyfs/online/3099_Create Format B.GIF" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;César&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2013 17:34:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110388#M9434</guid>
      <dc:creator>CesarOmarHR</dc:creator>
      <dc:date>2013-02-15T17:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110389#M9435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at Chris' quotation marks compared to yours. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2013 17:43:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110389#M9435</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-15T17:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110390#M9436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also did the double quotation marks, still.. no approval of my format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2013 17:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110390#M9436</guid>
      <dc:creator>CesarOmarHR</dc:creator>
      <dc:date>2013-02-15T17:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110391#M9437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know what is it that i'm doing wrong&lt;IMG alt="Create Format C.GIF" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3105_Create Format C.GIF" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2013 17:55:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110391#M9437</guid>
      <dc:creator>CesarOmarHR</dc:creator>
      <dc:date>2013-02-15T17:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110392#M9438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could also defined a character format (Call it $MD2SIGN.)&amp;nbsp; to convert from MMDD values to Zodiak sign.&lt;/P&gt;&lt;P&gt;Then you could calculate the sign using this simple statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sign = put(put(dob,mmddyy4.),$md2sign.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is SAS code to generate the format.&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; value $md2sign&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0321' - '0419' = 'Aries'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0420' - '0520' = 'Taurus'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0521' - '0620' = 'Gemini'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0621' - '0722' = 'Cancer'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0723' - '0822' = 'Leo'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0823' - '0922' = 'Virgo'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0923' - '1022' = 'Libra'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '1023' - '1121' = 'Scorpio'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '1122' - '1221' = 'Sagittarious'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '1222' - '1231'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; ,'0101' - '0119' = 'Capricorn'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0120' - '0218' = 'Aquarius'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0219' - '0320' = 'Pisces'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; other = 'Unknown'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 23:49:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110392#M9438</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-02-17T23:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110393#M9439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know very little about EG but, I seem to recall, having a similar problem with applying date ranges.&amp;nbsp; While it is totally against everything I've learned in SAS, try it WITHOUT THE QUOTES AND WITHOUT THE ENDING d.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That SHOULDN'T work, but I seem to recall that is how I got it to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 04:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110393#M9439</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-02-18T04:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110394#M9440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another way to go about this would be to populate a calculated column using a case statement. It would work in much the same way as the method Chris described above but does not require the creation of a format. The following is a case statement that *should*&amp;nbsp; produce identical results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;CASE WHEN t1.date BETWEEN '21Mar2000' AND '19Apr2000' THEN 'Aries'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '20Apr2000' AND '20May2000' THEN 'Taurus'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '21May2000' AND '20Jun2000' THEN 'Gemini'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '21Jun2000' AND '22Jul2000' THEN 'Cancer'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '23Jul2000' AND '22Aug2000' THEN = 'Leo'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '23Aug2000' AND '22Sep2000' THEN 'Virgo'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '23Sep2000' AND '22Oct2000' THEN 'Libra'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '23Oct2000' AND '21Nov2000' THEN 'Scorpio'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '22Nov2000' AND '21Dec2000' THEN 'Sagittarious'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '22Dec2000' AND '31Dec2000' THEN 'Capricorn'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '01Jan2000' AND '19Jan2000' THEN 'Capricorn'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '20Jan2000' AND '18Feb2000' THEN 'Aquarius'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN t1.date BETWEEN '19Feb2000' AND '20Mar2000' THEN 'Pisces'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE 'Unknown'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;END&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did not include the 'd behind my date values because in my input table the date column is defined as a string instead of a date. You may have to change it depending on the format of your input. Also, this raises a question that I do not know the answer to (I am a fairly new SAS EG user myself). What are the performance differences between running this case statement vs building a format like Chris described? If I were to run this function on say millions of rows would one run faster than the other? Just curious =]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 16:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110394#M9440</guid>
      <dc:creator>ZachLain</dc:creator>
      <dc:date>2013-02-28T16:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110395#M9441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS Formats are pretty fast, and I'm not sure you would see a big difference in a SAS data table.&amp;nbsp; But if your data source is in a database, PROC SQL can push the logic into the database process and perform the operation there, and the result could come back a lot quicker.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, suppose you want to run a query on a database (Oracle, let's say) of 1 million records - names and birthdays.&amp;nbsp; You want to know the freq distribution of the Zodiac signs across this population -- counts, essentially.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a SAS format, PROC SQL has to pull all records from Oracle to your SAS session, apply the format, and then count the record into one of the 12 "sign" groups.&amp;nbsp; But if your SQL code can run in the Oracle process, then the database evaluates the CASE and adds the result to the count (assuming you are doing a GROUP BY Sign).&amp;nbsp; At the end, only 12 records come over into SAS -- one for each Zodiac sign and its aggregated count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You've saved lots of I/O processing, moving 12 records instead of 1 million.&amp;nbsp; If there is a difference in the speed of SAS formats and a CASE statement, it's most likely negligible compared to the I/O cost .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: there *is* a way for you to "install" SAS formats into a database by using &lt;A href="http://support.sas.com/documentation/onlinedoc/indbtech/"&gt;SAS In-Database Technologies&lt;/A&gt;.&amp;nbsp; That helps you to get the best of both worlds: flexibility and power of Formats, with the "local" processing in the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 19:47:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110395#M9441</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-02-28T19:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110396#M9442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was very informative. Thanks for the quick reply!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 19:53:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110396#M9442</guid>
      <dc:creator>ZachLain</dc:creator>
      <dc:date>2013-02-28T19:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate zodiac sign based on dd-mm-yyyy birthdates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110397#M9443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A href="mailto:Chris@SAS"&gt;Chris@SAS&lt;/A&gt; it all worked correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 19:57:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-zodiac-sign-based-on-dd-mm-yyyy-birthdates/m-p/110397#M9443</guid>
      <dc:creator>CesarOmarHR</dc:creator>
      <dc:date>2013-02-28T19:57:42Z</dc:date>
    </item>
  </channel>
</rss>

