title: Get Current Unix Epoch Time-stamp in seconds in SQL Server
body: <p>I have the following C# method to get current unix epoch time stamp,</p>
  
  <pre><code>    public static long GetCurrentUnixTimestampSeconds()
      {
          var unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
          return (long)(DateTime.UtcNow - unixEpoch).TotalSeconds;
      }
  </code></pre>
  
  <p>I need the same in SQL Server. Is it possible?</p>