<?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 time stamp conversion in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469627#M285555</link>
    <description>&lt;P&gt;The T is part of the ISO standard for datetimes. If you don't want it for final displays, store the formatted value in a character variable and use substr() or translate() to remove it.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jun 2018 13:50:08 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-06-12T13:50:08Z</dc:date>
    <item>
      <title>Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469579#M285546</link>
      <description>&lt;P&gt;Good Day&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to convert a Date time stamp that I have for e.g 03APR18:08:41:37 to&amp;nbsp;YYYY-MM-DD HH:MM:SS:sss (2018-05-25 08:14.368000).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have searched for a solution with no luck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 11:16:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469579#M285546</guid>
      <dc:creator>EMC9</dc:creator>
      <dc:date>2018-06-12T11:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469590#M285547</link>
      <description>&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Post test data in th form of a datastep.&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Now we need to ask teh question, is that a datetime variable, is it text?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming it is numeric datetime, then you would put it into the relevant format, most likely an e8601dt. format.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:20:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469590#M285547</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-12T12:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469593#M285548</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is a datetime variable &amp;amp; not text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have manged to convert all to datetime as per the below step, I need to now convert the below in the desired output which is :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;YYYY-MM-DD HH:MM:SS:sss&lt;/P&gt;
&lt;P&gt;Eg. 2018-05-25 08:14.368000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table want as&lt;/P&gt;
&lt;P&gt;select *, DHMS(CREATE_DATEINCIDENTS,0,0,0) as CREATE_DATEINCIDENTS1 format=datetime20.,&lt;BR /&gt; DHMS(REPORTED_DATE,0,0,0) as REPORTED_DATE1 format=datetime20.,&lt;BR /&gt; DHMS(RESPONDED_DATE,0,0,0) as RESPONDED_DATE1 format=datetime20.,&lt;BR /&gt; DHMS(CLOSED_DATE,0,0,0) as CLOSED_DATE1 format=datetime20.,&lt;BR /&gt; DHMS(FIRST_DEP_DATE,0,0,0) as FIRST_DEP_DATE1 format=datetime20.,&lt;BR /&gt; DHMS(LAST_DEP_DATE,0,0,0) as LAST_DEP_DATE1 format=datetime20.&lt;/P&gt;
&lt;P&gt;from have;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469593#M285548</guid>
      <dc:creator>EMC9</dc:creator>
      <dc:date>2018-06-12T12:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469597#M285549</link>
      <description>&lt;P&gt;As I mentioned, I believe e8601dt is the format you want, from the docs:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#n03vr57gdozvean1klfaaa14c9c0.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#n03vr57gdozvean1klfaaa14c9c0.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Example at bottom of that page.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which is in the main list of formats:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#p0z62k899n6a7wn1r5in6q5253v1.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#p0z62k899n6a7wn1r5in6q5253v1.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:37:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469597#M285549</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-12T12:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469600#M285550</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the update.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried that :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test;&lt;BR /&gt;format CREATE_DATEINCIDENTS e8601dt.;&lt;BR /&gt;set work.'10_06_18_sla'n;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;output =&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="161"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="161"&gt;1960-01-01T05:55:11&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it is now displaying all 19600101 &amp;amp; "T" which I don't want.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:43:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469600#M285550</guid>
      <dc:creator>EMC9</dc:creator>
      <dc:date>2018-06-12T12:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469607#M285551</link>
      <description>&lt;P&gt;That indicates to me that create_dateincidents is not a datetime variable.&amp;nbsp; It could be a time value, as the date part is displaying a default.&lt;/P&gt;
&lt;P&gt;Post some test data, no need to go through this guessing game.&lt;/P&gt;
&lt;P&gt;Also, very bad idea to use:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;set work.'10_06_18_sla'n;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;the named string.&amp;nbsp; &amp;nbsp;I would highly suggest you avoid that, it is really only for external datasources.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:53:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469607#M285551</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-12T12:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469615#M285552</link>
      <description>&lt;P&gt;Hi not sure how to load data :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sample I copied is :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;10APR2018:00:00:00&lt;BR /&gt;10APR2018:00:00:00&lt;BR /&gt;16APR2018:00:00:00&lt;BR /&gt;16APR2018:00:00:00&lt;BR /&gt;19APR2018:00:00:00&lt;BR /&gt;26APR2018:00:00:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I click on properties it displays the&amp;nbsp;calender icon&amp;nbsp; &amp;amp; TYPE = NUMERIC &amp;amp; FORMAT=DATETIME20.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 13:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469615#M285552</guid>
      <dc:creator>EMC9</dc:creator>
      <dc:date>2018-06-12T13:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469622#M285553</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/23871"&gt;@EMC9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi not sure how to load data :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sample I copied is :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;10APR2018:00:00:00&lt;BR /&gt;10APR2018:00:00:00&lt;BR /&gt;16APR2018:00:00:00&lt;BR /&gt;16APR2018:00:00:00&lt;BR /&gt;19APR2018:00:00:00&lt;BR /&gt;26APR2018:00:00:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I click on properties it displays the&amp;nbsp;calender icon&amp;nbsp; &amp;amp; TYPE = NUMERIC &amp;amp; FORMAT=DATETIME20.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not that hard:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input CREATE_DATEINCIDENTS datetime20.;
format CREATE_DATEINCIDENTS e8601dt20.;
cards;
10APR2018:00:00:00
10APR2018:00:00:00
16APR2018:00:00:00
16APR2018:00:00:00
19APR2018:00:00:00
26APR2018:00:00:00
;
run;

proc print data=have noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;CREATE_DATEINCIDENTS

 2018-04-10T00:00:00
 2018-04-10T00:00:00
 2018-04-16T00:00:00
 2018-04-16T00:00:00
 2018-04-19T00:00:00
 2018-04-26T00:00:00
&lt;/PRE&gt;
&lt;P&gt;See my footnotes for hints about posting data and code.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 13:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469622#M285553</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-12T13:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469623#M285554</link>
      <description>&lt;P&gt;Thank you , is there a way to remove the "T" in the output ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;2018-04-26"&lt;STRONG&gt;T"&lt;/STRONG&gt;00:00:00&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 13:34:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469623#M285554</guid>
      <dc:creator>EMC9</dc:creator>
      <dc:date>2018-06-12T13:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469627#M285555</link>
      <description>&lt;P&gt;The T is part of the ISO standard for datetimes. If you don't want it for final displays, store the formatted value in a character variable and use substr() or translate() to remove it.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 13:50:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469627#M285555</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-12T13:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469633#M285556</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/23871"&gt;@EMC9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is a datetime variable &amp;amp; not text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have manged to convert all to datetime as per the below step, I need to now convert the below in the desired output which is :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;YYYY-MM-DD HH:MM:SS:sss&lt;/P&gt;
&lt;P&gt;Eg. 2018-05-25 08:14.368000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table want as&lt;/P&gt;
&lt;P&gt;select *, DHMS(CREATE_DATEINCIDENTS,0,0,0) as CREATE_DATEINCIDENTS1 format=datetime20.,&lt;BR /&gt; DHMS(REPORTED_DATE,0,0,0) as REPORTED_DATE1 format=datetime20.,&lt;BR /&gt; DHMS(RESPONDED_DATE,0,0,0) as RESPONDED_DATE1 format=datetime20.,&lt;BR /&gt; DHMS(CLOSED_DATE,0,0,0) as CLOSED_DATE1 format=datetime20.,&lt;BR /&gt; DHMS(FIRST_DEP_DATE,0,0,0) as FIRST_DEP_DATE1 format=datetime20.,&lt;BR /&gt; DHMS(LAST_DEP_DATE,0,0,0) as LAST_DEP_DATE1 format=datetime20.&lt;/P&gt;
&lt;P&gt;from have;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If SAS does not supply a date, time or datetime format to display such values exactly as you desire the options in the Proc Format PICTURE statement will let you do so.&lt;/P&gt;
&lt;PRE&gt;proc format library=work;
/* default datetime18 shows 2 digit year (with 2 leading blanks, this makes custom
   datetime format that uses 18 digits and 4 digit year
   characters not part of a directive such as : or / are displayed as literal character
*/
picture mydatetime ( default=24)
low-high = '%Y-%0m-%0d %H:%M:%s'   (datatype=datetime)
;
run;

data _null_;
   x='15Feb2017:10:12:13.368'dt;
   put x= mydatetime26.6 ;
run;&lt;/PRE&gt;
&lt;P&gt;For portability it may be worth staying with the SAS supplied formats though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just like other formats that control decimal displays you have to indicate how many decimals to get fractions of a second&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469633#M285556</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-12T14:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469669#M285557</link>
      <description>&lt;P&gt;Thanks - this is actually working but I noticed some fields didn't change , when I open the cell to view it displays the below :&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2018/04/03 08:41:37 AM&lt;/STRONG&gt; - I tried to edit your code below with no luck.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 16:26:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469669#M285557</guid>
      <dc:creator>EMC9</dc:creator>
      <dc:date>2018-06-12T16:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469684#M285558</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/23871"&gt;@EMC9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks - this is actually working but I noticed some fields didn't change , when I open the cell to view it displays the below :&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2018/04/03 08:41:37 AM&lt;/STRONG&gt; - I tried to edit your code below with no luck.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Open what cell with what to view the values?&lt;/P&gt;
&lt;P&gt;If you mean the external source file such as a spread sheet then the comparison is next to meaningless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the value is displayed in SAS that way then it is character, unless you already have a custom date time format to do AM PM time, and needs to be read with an appropriate informat, likely the ANYDTDTM (any datetime format).&lt;/P&gt;
&lt;PRE&gt;data example;
   x="2018/04/03 08:41:37 AM";
   y= input(x, anydtdtm32.);
   format y datetime20.;
run;&lt;/PRE&gt;
&lt;P&gt;And then apply the new format to the new actual datetime valued variable. Sometimes the ANYDTDTM needs to explicitly have more digits indicated than you think to read things correctly. Not sure why but sometimes using 32 gets better results than the default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 17:06:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469684#M285558</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-12T17:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469858#M285559</link>
      <description>&lt;P&gt;Thanks , I might be slow or missing something , I am trying to do that with my below code but it does not resolve.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e.g code :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data example;&lt;BR /&gt; x="2018/04/03 08:41:37 AM";&lt;BR /&gt; y= input(x, anydtdtm32.);&lt;BR /&gt; format y datetime20.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table want as&lt;/P&gt;
&lt;P&gt;select *, DHMS(CREATE_DATEINCIDENTS,0,0,0) as CREATE_DATEINCIDENTS1 format=mydatetime26.6,&lt;BR /&gt; DHMS(REPORTED_DATE,0,0,0) as REPORTED_DATE1 format=mydatetime26.6,&lt;BR /&gt; DHMS(RESPONDED_DATE,0,0,0) as RESPONDED_DATE1 format=mydatetime26.6,&lt;BR /&gt; DHMS(CLOSED_DATE,0,0,0) as CLOSED_DATE1 format=mydatetime26.6,&lt;BR /&gt; DHMS(FIRST_DEP_DATE,0,0,0) as FIRST_DEP_DATE1 format=mydatetime26.6,&lt;BR /&gt; DHMS(LAST_DEP_DATE,0,0,0) as LAST_DEP_DATE1 format=mydatetime26.6,&lt;BR /&gt; DHMS(Create_Date,0,0,0) as Create_Date1 format=datetime21.,&lt;BR /&gt; DHMS(HandOverRegion,0,0,0) as HandOverRegion1 format=datetime20.,&lt;BR /&gt; DHMS(HandOverFulfilment,0,0,0) as HandOverFulfilment1 format=datetime20.,&lt;BR /&gt; DHMS(FULFILLMENT_CHANGE,0,0,0) as FULFILLMENT_CHANGE1 format=datetime20.,&lt;BR /&gt; DHMS(Modified_Date,0,0,0) as Modified_Date format=datetime20.&lt;BR /&gt;/* (((Create_Date/60)/60)/24) + '01JAN1970'd as Create_Date_new format mydatetime26.6,*/&lt;BR /&gt;/* datepart(Create_Date)+ '01JAN1970'd as date_test format=mydatetime26.6*/&lt;/P&gt;
&lt;P&gt;from work.x10_06_18_sla;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output displays correctly until&amp;nbsp;&lt;SPAN&gt;LAST_DEP_DATE, from&amp;nbsp;Create_Date it does not resolve.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;can you please maybe show me what I am doing wrong.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 09:28:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469858#M285559</guid>
      <dc:creator>EMC9</dc:creator>
      <dc:date>2018-06-13T09:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469877#M285560</link>
      <description>&lt;P&gt;How about posting an example for your dataset work.x10_06_18_sla??&lt;/P&gt;
&lt;P&gt;And in a usable form, please.&lt;/P&gt;
&lt;P&gt;We're all still fishing in the dark.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 11:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469877#M285560</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-13T11:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date time stamp conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469913#M285561</link>
      <description>&lt;P&gt;Thanks for the help ,&amp;nbsp; I manged to figure it out and the code below worked fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;format&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; picture dtpic&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; other='%Y-%0m-%0d %0H:%0M:%0S' (datatype=datetime)&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&amp;nbsp;want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format Create_date dtpic.;&lt;/P&gt;
&lt;P&gt;;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:10:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-time-stamp-conversion/m-p/469913#M285561</guid>
      <dc:creator>EMC9</dc:creator>
      <dc:date>2018-06-13T13:10:47Z</dc:date>
    </item>
  </channel>
</rss>

