<?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: date to datetime conversion in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451781#M113961</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138619"&gt;@Satish_Parida&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;The Problem is the column assignment is dynamic and I do not know the column names the time I write the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The formats are derived from a source table, which is in oracle so the difference of data and datetime (Oracle always sends dates as datetime)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I can not use dhms in the code as I wont be knowing the variable names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for quick response.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can't write code without knowing the data. So you either have fixed names, or names supplied by another means (macro variables, call execute off datasets). Your argument is therefore a non-argument.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 07:08:46 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-04-06T07:08:46Z</dc:date>
    <item>
      <title>date to datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451534#M113855</link>
      <description>&lt;P&gt;I have a dataset where I have a variable which is in date9 format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am changing the date to datetime using fomat as following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data proclib.a_e_1;
format AEENDTC DATETIME20. AEENRF $12. AESEV $64. AESR $12. AESTDTC DATETIME20. AETERM $124. COUNTRY $12. SITEID 
$16. STUDYID $36. SUBJID 8.;
set proclib.a_e;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In this Process the dates are getting appended with current time stamp from the system or some random time stamp.&lt;BR /&gt;I need them to be 00:00:00.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way of controlling that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 14:47:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451534#M113855</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2018-04-05T14:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: date to datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451535#M113856</link>
      <description>&lt;P&gt;SAS dates are counts of days, SAS datetimes are counts of seconds.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;datetime = dhms(date,0,0,0);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;will convert a date to a datetime. Or multiply by 86400.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 14:50:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451535#M113856</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-04-05T14:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: date to datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451539#M113859</link>
      <description>&lt;P&gt;The Problem is the column assignment is dynamic and I do not know the column names the time I write the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formats are derived from a source table, which is in oracle so the difference of data and datetime (Oracle always sends dates as datetime)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I can not use dhms in the code as I wont be knowing the variable names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for quick response.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 14:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451539#M113859</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2018-04-05T14:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: date to datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451546#M113863</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138619"&gt;@Satish_Parida&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;The Problem is the column assignment is dynamic and I do not know the column names the time I write the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But this is an entirely different problem than the one you described originally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may be that some sort of logic and use of macros will help you solve this. But you'd have to describe the problem in a lot more detail.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 15:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451546#M113863</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-05T15:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: date to datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451547#M113864</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138619"&gt;@Satish_Parida&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;The Problem is the column assignment is dynamic and I do not know the column names the time I write the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The formats are derived from a source table, which is in oracle so the difference of data and datetime (&lt;FONT color="#800000"&gt;&lt;STRONG&gt;Oracle always sends dates as datetime)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I can not use dhms in the code as I wont be knowing the variable names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for quick response.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since Oracle always sends the value as date time where are you getting a date from that needs to be converted back to datetime? This kind of sounds like a somewhat flawed process. I would go back to where you convert the Oracle datetime value to a date and re-examine what you are doing to the data.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 15:01:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451547#M113864</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-05T15:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: date to datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451781#M113961</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138619"&gt;@Satish_Parida&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;The Problem is the column assignment is dynamic and I do not know the column names the time I write the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The formats are derived from a source table, which is in oracle so the difference of data and datetime (Oracle always sends dates as datetime)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I can not use dhms in the code as I wont be knowing the variable names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for quick response.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can't write code without knowing the data. So you either have fixed names, or names supplied by another means (macro variables, call execute off datasets). Your argument is therefore a non-argument.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 07:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/451781#M113961</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-04-06T07:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: date to datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/456415#M115600</link>
      <description>&lt;P&gt;Yes, you are correct. I was trying to find out an easy way out rather than writing very complex macro functions to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 07:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-to-datetime-conversion/m-p/456415#M115600</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2018-04-23T07:22:13Z</dc:date>
    </item>
  </channel>
</rss>

