Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

SQL

Casting a Datetime to Date Sqlserver 2008

cast(getdate() As Date)
https://snipt.net/embed/842fae8370d256c3ff55a2a5a1656f88/
https://snipt.net/raw/842fae8370d256c3ff55a2a5a1656f88/
842fae8370d256c3ff55a2a5a1656f88
sql
SQL
1
2016-12-09T17:30:03
True
False
False
Feb 13, 2014 at 02:52 PM
/api/public/snipt/113504/
casting-a-datetime-to-date-sqlserver-2008
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">cast</span><span class="p">(</span><span class="n">getdate</span><span class="p">()</span> <span class="k">As</span> <span class="nb">Date</span><span class="p">)</span> </span></pre></div> </td></tr></table>
casting, date, datetime, sqlserver

Bash

Recursively find and list the last modified files in a directory

stat --printf="%y %n\n" $(ls -tr $(find * -type f))
https://snipt.net/embed/658e81891f567c2b90931e8f90e60846/
https://snipt.net/raw/658e81891f567c2b90931e8f90e60846/
658e81891f567c2b90931e8f90e60846
bash
Bash
1
2016-12-10T07:43:05
True
False
False
Jan 31, 2014 at 06:10 AM
/api/public/snipt/109821/
recursively-find-and-list-the-last-modified-files-in-a-directory
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>stat --printf<span class="o">=</span><span class="s2">&quot;%y %n\n&quot;</span> <span class="k">$(</span>ls -tr <span class="k">$(</span>find * -type f<span class="k">))</span> </span></pre></div> </td></tr></table>
date, find, ls, stat
Copyrighted, illegal, or inappropriate content? Email [email protected].