<legend id='C8qPw'><style id='C8qPw'><dir id='C8qPw'><q id='C8qPw'></q></dir></style></legend>
    • <bdo id='C8qPw'></bdo><ul id='C8qPw'></ul>
  • <tfoot id='C8qPw'></tfoot>

      <i id='C8qPw'><tr id='C8qPw'><dt id='C8qPw'><q id='C8qPw'><span id='C8qPw'><b id='C8qPw'><form id='C8qPw'><ins id='C8qPw'></ins><ul id='C8qPw'></ul><sub id='C8qPw'></sub></form><legend id='C8qPw'></legend><bdo id='C8qPw'><pre id='C8qPw'><center id='C8qPw'></center></pre></bdo></b><th id='C8qPw'></th></span></q></dt></tr></i><div id='C8qPw'><tfoot id='C8qPw'></tfoot><dl id='C8qPw'><fieldset id='C8qPw'></fieldset></dl></div>

      <small id='C8qPw'></small><noframes id='C8qPw'>

      1. Oracle 日期减法

        Oracle Date Subtraction(Oracle 日期减法)
          <bdo id='ViKbt'></bdo><ul id='ViKbt'></ul>

            <small id='ViKbt'></small><noframes id='ViKbt'>

            <i id='ViKbt'><tr id='ViKbt'><dt id='ViKbt'><q id='ViKbt'><span id='ViKbt'><b id='ViKbt'><form id='ViKbt'><ins id='ViKbt'></ins><ul id='ViKbt'></ul><sub id='ViKbt'></sub></form><legend id='ViKbt'></legend><bdo id='ViKbt'><pre id='ViKbt'><center id='ViKbt'></center></pre></bdo></b><th id='ViKbt'></th></span></q></dt></tr></i><div id='ViKbt'><tfoot id='ViKbt'></tfoot><dl id='ViKbt'><fieldset id='ViKbt'></fieldset></dl></div>

            <legend id='ViKbt'><style id='ViKbt'><dir id='ViKbt'><q id='ViKbt'></q></dir></style></legend>

          1. <tfoot id='ViKbt'></tfoot>

                    <tbody id='ViKbt'></tbody>

                  本文介绍了Oracle 日期减法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我将如何编写一个表达式,让我以天、小时、分钟、秒等为单位给出两个日期之间的差异?默认情况下,在 oracle 中减去两个日期以十进制形式返回天数.

                  How would i write an expression that gives me the difference between two dates in days, hours, minutes, seconds, etc? By default subtracting two dates in oracle returns days as a decmial.

                  推荐答案

                  那个小数点是提供的两个日期之间相差的天数.您可以做一些数学运算,将其转换为天、小时、分钟、秒等.

                  That decimal is the number of days difference between the two dates provided. You can do a little math to convert that to days, hours, minutes, seconds, etc.

                  编辑:我知道你在找什么.我确定有更简单的方法,但我可能会这样完成:

                  EDIT: I see what you're looking for. I'm sure there's an easier way, but I would probably accomplish it thusly:

                  select trunc(5.3574585) days, 
                         trunc(mod((5.3574585) * 24, 24)) hours, 
                         trunc(mod((5.3574585) * 24 * 60, 60)) minutes, 
                         trunc(mod((5.3574585) * 24 * 60 * 60, 60)) seconds 
                    from dual;
                  

                  ...其中 5.3574585 是减法返回的天数...

                  ...where 5.3574585 is the number of days returned by the subtraction...

                  注意:这并没有经过真正的测试,这是我的想法.

                  这篇关于Oracle 日期减法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                  SQL query to group by day(按天分组的 SQL 查询)
                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Include missing months in Group By query(在 Group By 查询中包含缺失的月份)

                    <legend id='uElOJ'><style id='uElOJ'><dir id='uElOJ'><q id='uElOJ'></q></dir></style></legend>
                      <tfoot id='uElOJ'></tfoot>
                        <tbody id='uElOJ'></tbody>
                      • <bdo id='uElOJ'></bdo><ul id='uElOJ'></ul>

                      • <small id='uElOJ'></small><noframes id='uElOJ'>

                            <i id='uElOJ'><tr id='uElOJ'><dt id='uElOJ'><q id='uElOJ'><span id='uElOJ'><b id='uElOJ'><form id='uElOJ'><ins id='uElOJ'></ins><ul id='uElOJ'></ul><sub id='uElOJ'></sub></form><legend id='uElOJ'></legend><bdo id='uElOJ'><pre id='uElOJ'><center id='uElOJ'></center></pre></bdo></b><th id='uElOJ'></th></span></q></dt></tr></i><div id='uElOJ'><tfoot id='uElOJ'></tfoot><dl id='uElOJ'><fieldset id='uElOJ'></fieldset></dl></div>