<?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: to find if a nemeric variable is a date? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163436#M31660</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this mean you want to automatically create code from the structure of SAS tables so you can load them into Oracle?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Nov 2014 12:28:41 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2014-11-10T12:28:41Z</dc:date>
    <item>
      <title>to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163430#M31654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to find if a newmeric variable is a date, to replicate a table using connect to oracle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help in figuring the functrion or procedure how to do that.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Moovendhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 07:34:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163430#M31654</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2014-11-10T07:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163431#M31655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it a SAS table, or a table in Oracle you access via SAS/ACCESS to Oracle?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 08:04:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163431#M31655</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-11-10T08:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163432#M31656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are reading data from Oracle this link gives you the default translations SAS applies to Oracle data types:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/67473/HTML/default/viewer.htm#p06jk0u30uhuj5n18fqw9sxr25lk.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/67473/HTML/default/viewer.htm#p06jk0u30uhuj5n18fqw9sxr25lk.htm"&gt;SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Fifth Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If SAS reads an Oracle datetime column it becomes a numeric column in SAS with the DATETIME format applied, by default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As there is no data type of DATE or DATETIME in SAS the only reliable way to tell if it is a date is if it has a date-related format or informat assigned to it, or you know the history of where the column came from, for example an Oracle data type of datetime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without this information you cannot reliably identify a SAS numeric as a date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 08:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163432#M31656</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-11-10T08:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163433#M31657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would recommend learning what your data is before attempting to work with it.&amp;nbsp; Understanding your data, where it comes from, what it is, and what I represents *before* starting to code will help you far more than trying to shoehorn data into pre-existing code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 09:32:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163433#M31657</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-11-10T09:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163434#M31658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the table is from Oracle , resort to Admin of Oracle , there is a dictionary table in Oracle to tell you if it is a date variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 09:42:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163434#M31658</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-11-10T09:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163435#M31659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for the response...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I didn't mention it, I am loading a sas dataet to the Oracle server.&lt;/P&gt;&lt;P&gt;If I am able to find the date variables from the nuemeric variables that would be verymuch helpful for me.&lt;/P&gt;&lt;P&gt;I don't want to copy the dataset of Schema, I want to create the code to the executed in oracle that would create an empty table as same as the dataset in SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Moovendhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 12:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163435#M31659</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2014-11-10T12:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163436#M31660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this mean you want to automatically create code from the structure of SAS tables so you can load them into Oracle?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 12:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163436#M31660</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-11-10T12:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163437#M31661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, that's pretty straight forward.&amp;nbsp; Isolate the required metadata in sashelp.vcolumns (or dictionary tables), you can also generate the code from there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 13:05:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163437#M31661</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-11-10T13:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163438#M31662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it actually is a SAS table ? and follow &lt;STRONG style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="312252" data-username="SASKiwi" href="https://communities.sas.com/people/SASKiwi" id="jive-31225231004635846544186" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #0e66ba;"&gt;SASKiwi&lt;/A&gt; &lt;/STRONG&gt; mentioned , check the variable's informat and format .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 13:06:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163438#M31662</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-11-10T13:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163439#M31663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 13:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163439#M31663</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2014-11-10T13:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163440#M31664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes but the issue is, there are n number of sas datet formats, and it will not be possible to check for all the sas date formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I case if there is any alternative thjat would help..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 13:53:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163440#M31664</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2014-11-10T13:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163441#M31665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see the issue.&amp;nbsp; Pull the information from the metadata tables, that is what they are for.&amp;nbsp; If there are many then do a loop, or macro.&amp;nbsp; Post some example data and what you want and we can show you how to do it.&amp;nbsp; There are many examples of using SAS metadata to generate code which I have posted here using call execute - you can search for it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 14:02:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163441#M31665</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-11-10T14:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163442#M31666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually there are not too many date format , about fifty I guess. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 14:14:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163442#M31666</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-11-10T14:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163443#M31667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are about 123 date formats as of now that I collected, including week number formats etc...&lt;/P&gt;&lt;P&gt;For now I am Using SASKiwi's steps, as you recomonded.&lt;/P&gt;&lt;P&gt;I want this to work for user defined formats as well, just not so clear on that part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 15:21:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163443#M31667</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2014-11-10T15:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163444#M31668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS only knows two data types, numeric and character. There is no isdate() function or similar, so you have to DIY.&lt;/P&gt;&lt;P&gt;Making users adhere to standards is paramount if you want to make your job less of a hassle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 15:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163444#M31668</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-11-10T15:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: to find if a nemeric variable is a date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163445#M31669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Kurt, for the datasets that are gonnu be created, we have given clear instructions.&lt;/P&gt;&lt;P&gt;But for the previous datasets that were created with custom formats, we are creating the formats and then creating the metadata for the database ie in SQL.&lt;/P&gt;&lt;P&gt;For the newer versions this issue won't be there, hoping so &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 06:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-find-if-a-nemeric-variable-is-a-date/m-p/163445#M31669</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2014-11-18T06:31:51Z</dc:date>
    </item>
  </channel>
</rss>

