Figure out who is the oldest

blov · · 872 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I have a database that one of the columns lists a time and date in the &#39;RFC850&#39; format; I want my program to find the oldest date in the whole table... Can someone help me with this? I can&#39;t seem to find anything on Google like what i need to do.</p> <hr/>**评论:**<br/><br/>kardianos: <pre><p>order by convert(datetime, mycol) ?</p></pre>caseynashvegas: <pre><p>Assuming this is a relational database, yes, this is SQL question, not a Go specific question. What is your database?</p></pre>SaturnsVoid: <pre><p>MySQL is what i am using</p></pre>caseynashvegas: <pre><p>Yes, then your sql statement would be <code>select top 1 * order by convert(&lt;col&gt;, datetime) from &lt;table&gt;</code></p></pre>mohi666: <pre><p>I clicked on this thread to compare my age against others in this sub, thinking your title isn&#39;t related to coding. lol. </p></pre>Killing_Spark: <pre><p>Nobody would be shouting at you for doing so. 20 years old, so im pretty unlikely to win :/</p></pre>twek: <pre><p>I guess at 26 I&#39;m the winner so far</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

872 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传