title: SAP HANA Decimal to timestamp or seconddate SLT
body: <p>I am using SLT to load tables into our Hana DB.  SLT uses the ABAP dictionary and sends timestamps as decimal (15,0) to the HANA DB.  Once in the HANA DB via a calculated column in a calculation view, I am trying to convert the decimals to timestamps or seconddates.   Table looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/KBboF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KBboF.png" alt="Table Definition"></a></p>
  
  <p>I run a small SLT transformation to populate columns 27-30.  The ABAP layer in SLT populates the columns based on the Database transactions. </p>
  
  <p>The problem comes when I try and convert columns 28-30 to timestamps or seconddates. using syntax like this:</p>
  
  <pre><code>Select to_timestamp(DELETE_TIME)
   FROM SLT_REP.AUSP
  
  Select to_seconddate(DELETE_TIME)
   FROM SLT_REP.AUSP
  </code></pre>
  
  <p>I get the following errors:</p>
  
  <p><a href="https://i.stack.imgur.com/mptfi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mptfi.png" alt="Timestamp"></a>
  <a href="https://i.stack.imgur.com/yYt0F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yYt0F.png" alt="enter image description here"></a></p>
  
  <p>Problem being, It works some times as well:
  <a href="https://i.stack.imgur.com/txneb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/txneb.png" alt="enter image description here"></a></p>
  
  <p>The syntax in calculated column looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/LXel5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LXel5.png" alt="Calc Column"></a></p>
  
  <p>With the error from calculation view being:</p>
  
  <p><a href="https://i.stack.imgur.com/qF0Xq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qF0Xq.png" alt="enter image description here"></a></p>
  
  <p>Has anyone found a good way to convert ABAP timestamps (Decimal (15,0)) to Timestamp or Seconddate in HANA?</p>