title: Explicit conversion of datetime2 to timestamp in SQL Server
body: <p>I am working with a query in SQL Server:</p>
  
  <pre><code>select datetimevalue 
  from temp;  
  </code></pre>
  
  <p>Here datetimevalue column's datatype is <code>datetime2</code> and I need to convert this value into <strong><em>timestamp</em></strong>.</p>
  
  <p>In MySQL if I simply write:                             </p>
  
  <pre><code>select UNIX_TIMESTAM(datetimevalue) 
  from temp;
  </code></pre>
  
  <p>then it returns timestamp.</p>
  
  <p>Is there any way to convert datetime in timestamp explicitly in SQL Server 2014?</p>