<?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: Dealing with a variable with two different formats in one (date and character) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566522#M159232</link>
    <description>&lt;P&gt;Thanks, where should I use this command, in merging syntax?&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2019 10:22:28 GMT</pubDate>
    <dc:creator>sks521</dc:creator>
    <dc:date>2019-06-17T10:22:28Z</dc:date>
    <item>
      <title>Dealing with a variable with two different formats in one (date and character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566518#M159228</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am doing a many-to-one merge of two data sets. one is the source data set and the other has two variables; id to merge on and the other one 'Date' which is in below format in excel sheet;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;21/07/2017&lt;/P&gt;&lt;P&gt;Null&lt;/P&gt;&lt;P&gt;08/02/2018&lt;/P&gt;&lt;P&gt;Null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So when I am merging the two data sets, the values I am seeing in the merged set for 'Date' are like;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;42937&lt;/P&gt;&lt;P&gt;Null&lt;/P&gt;&lt;P&gt;42971&lt;/P&gt;&lt;P&gt;Null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help with writing the right code please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 10:03:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566518#M159228</guid>
      <dc:creator>sks521</dc:creator>
      <dc:date>2019-06-17T10:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with a variable with two different formats in one (date and character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566519#M159229</link>
      <description>&lt;P&gt;SAS log is also giving me this message;&lt;/P&gt;&lt;P&gt;'One or more variables were converted because the data type is not supported by the V9&lt;BR /&gt;engine. For more details, run with options MSGLEVEL=I.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sarwat&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 10:12:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566519#M159229</guid>
      <dc:creator>sks521</dc:creator>
      <dc:date>2019-06-17T10:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with a variable with two different formats in one (date and character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566520#M159230</link>
      <description>&lt;P&gt;Simply use the ddmmyy10. format like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format date ddmmyy10.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 10:19:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566520#M159230</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-06-17T10:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with a variable with two different formats in one (date and character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566521#M159231</link>
      <description>&lt;P&gt;Start by getting rid of Excel files as a data source. Save the spreadsheets as csv files and read those with data steps; this will give you control over the whole process, so you can properly set variable attributes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While fixing your process this way, you should post your merge code and the log from it. Posting example data in data steps with datalines will also be helpful.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 10:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566521#M159231</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-06-17T10:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with a variable with two different formats in one (date and character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566522#M159232</link>
      <description>&lt;P&gt;Thanks, where should I use this command, in merging syntax?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 10:22:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566522#M159232</guid>
      <dc:creator>sks521</dc:creator>
      <dc:date>2019-06-17T10:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with a variable with two different formats in one (date and character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566523#M159233</link>
      <description>&lt;P&gt;Thanks but how to save multiple worksheets as csv?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 10:25:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566523#M159233</guid>
      <dc:creator>sks521</dc:creator>
      <dc:date>2019-06-17T10:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with a variable with two different formats in one (date and character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566525#M159234</link>
      <description>&lt;P&gt;And if I use it in the proc import step, I get this error message;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: VARCHAR data type is not supported by the V9 engine. Variable DateIntStarted has been&lt;BR /&gt;converted to CHAR data type.&lt;BR /&gt;ERROR: You are trying to use the numeric format DDMMYY with the character variable&lt;BR /&gt;DateIntStarted in data set WORK.GPDATA.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 10:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566525#M159234</guid>
      <dc:creator>sks521</dc:creator>
      <dc:date>2019-06-17T10:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with a variable with two different formats in one (date and character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566526#M159235</link>
      <description>&lt;P&gt;So now I have created separate csv for each excel worksheet, imported them into SAS and merging went fine with one date variable having both var and char formats in one. I hope I am on the right track!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 10:44:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566526#M159235</guid>
      <dc:creator>sks521</dc:creator>
      <dc:date>2019-06-17T10:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with a variable with two different formats in one (date and character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566527#M159236</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/277970"&gt;@sks521&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks but how to save multiple worksheets as csv?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;File - Save as, as usual. If you are concerned about the workload, just take into account the troubles you have right now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A sustainable data handling process needs to keep Excel files out of the loop completely.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 10:51:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-a-variable-with-two-different-formats-in-one-date/m-p/566527#M159236</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-06-17T10:51:00Z</dc:date>
    </item>
  </channel>
</rss>

