<?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 achieve DB2 timestamp format through SAS? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114648#M23612</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Old fashioned string handling?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; myDttm = datetime();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; db2ts = cats(put(datepart(myDttm), yymmdd10.), "-", tranwrd(put(timepart(myDttm), tod9.), ":", "."), ".", substr(put(timepart(myDttm), mmss15.6), 10, 6));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; put db2ts;&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;SPAN style="font-family: courier new,courier;"&gt;2014-05-08-11.30.12.012000&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 May 2014 09:38:01 GMT</pubDate>
    <dc:creator>jthy</dc:creator>
    <dc:date>2014-05-08T09:38:01Z</dc:date>
    <item>
      <title>How to achieve DB2 timestamp format through SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114644#M23608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi every1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to load the current system date and time from SAS to a field (specified in Timestamp format) in DB2. I tried using datetime format for that variable in SAS and using proc append to load data to db2 table. But i am getting format mismatch error. I cannot change the datatype of the field in DB2 as it is already existing table in PROD. Does anyone have an idea of how to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Krisan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 16:18:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114644#M23608</guid>
      <dc:creator>Krisan</dc:creator>
      <dc:date>2012-11-01T16:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve DB2 timestamp format through SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114645#M23609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just try these options and check..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SASDATEFMT or DBSASTYPE...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 16:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114645#M23609</guid>
      <dc:creator>shivas</dc:creator>
      <dc:date>2012-11-01T16:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve DB2 timestamp format through SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114646#M23610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiva,&lt;/P&gt;&lt;P&gt;Have not seen you on the forum for a while. Welcome back!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 17:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114646#M23610</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-11-01T17:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve DB2 timestamp format through SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114647#M23611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might also consider building a picture format.&amp;nbsp; For a datetime value you could use something like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;picture dbdate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; other = '%Y-%0m-%0d:%0H:%0M:%0S' (datatype=datetime);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The %Y, %m, etc. are directives that can be used with picture formats.&amp;nbsp; There are over a dozen of them and they can be very helpful when working with date, time, and datetime values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 18:34:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114647#M23611</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2012-11-01T18:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve DB2 timestamp format through SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114648#M23612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Old fashioned string handling?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; myDttm = datetime();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; db2ts = cats(put(datepart(myDttm), yymmdd10.), "-", tranwrd(put(timepart(myDttm), tod9.), ":", "."), ".", substr(put(timepart(myDttm), mmss15.6), 10, 6));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; put db2ts;&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;SPAN style="font-family: courier new,courier;"&gt;2014-05-08-11.30.12.012000&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 09:38:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114648#M23612</guid>
      <dc:creator>jthy</dc:creator>
      <dc:date>2014-05-08T09:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve DB2 timestamp format through SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114649#M23613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you are appending the data the existing structure and the dataset you are building should be the same.&lt;/P&gt;&lt;P&gt;Your error-message is telling you something has failed with that. Try to find the reason by comparing those structures.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 12:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-achieve-DB2-timestamp-format-through-SAS/m-p/114649#M23613</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-08T12:26:10Z</dc:date>
    </item>
  </channel>
</rss>

