• SAP HANA的常用函数(时间类函数)



    SELECT ADD_DAYS(TO_DATE('2015-10-20','YYYY-MM-DD'),30) "add days" FROM DUMMY;
    SELECT ADD_MONTHS(TO_DATE('2015-10-20','YYYY-MM-DD'),1) "add months" FROM DUMMY;
    SELECT ADD_SECONDS(TO_TIMESTAMP('2015-10-21 23:30:45'),60*30) "add seconds" FROM DUMMY;
    SELECT ADD_YEARS(TO_DATE('2009-12-05','YYYY-MM-DD'), 1) "add years" FROM DUMMY;
    SELECT CURRENT_DATE "current date" FROM DUMMY;
    SELECT CURRENT_TIMESTAMP "current timestamp" FROM DUMMY;
    SELECT DAYNAME('2015-10-20') "dayname" FROM DUMMY;
    SELECT DAYOFMONTH('2011-05-30') "dayofmonth" FROM DUMMY;
    SELECT DAYOFYEAR('2011-05-30') "dayofyear" FROM DUMMY;
    SELECT DAYS_BETWEEN(TO_DATE('2009-12-05','YYYY-MM-DD'), TO_DATE('2010-01-05', 'YYYY-MM-DD')) "days between" FROM DUMMY;
    SELECT EXTRACT (YEAR FROM TO_DATE ('2010-01-04', 'YYYY-MM-DD')) "extract" FROM DUMMY;
    SELECT HOUR ('2010-01-04 12:34:56') "hour" FROM DUMMY;
    SELECT ISOWEEK(TO_DATE('2011-05-30','YYYY-MM-DD')) "isoweek" FROM DUMMY;
    SELECT LAST_DAY (TO_DATE('2010-01-04', 'YYYY-MM-DD')) "last day" FROM DUMMY;
    SELECT MINUTE ('2010-01-04 12:34:56') "minute" FROM DUMMY;
    SELECT MONTH ('2011-05-30') "month" FROM DUMMY;
    SELECT MONTHNAME ('2011-10-30') "monthname" FROM DUMMY;
    SELECT NEXT_DAY (TO_DATE ('2009-12-31', 'YYYY-MM-DD')) "next day" FROM DUMMY;
    SELECT NOW() "now" FROM DUMMY;
    SELECT QUARTER (TO_DATE('2015-04-01', 'YYYY-MM-DD'), 4) "quarter" FROM DUMMY;
    SELECT SECOND ('2015-04-01 12:34:56') "second" FROM DUMMY;
    SELECT SECONDS_BETWEEN ('2009-12-31', '2010-01-01') "seconds between" FROM DUMMY;
    SELECT WEEK (TO_DATE('2011-05-30', 'YYYY-MM-DD')) "week" FROM DUMMY;
    SELECT WEEKDAY (TO_DATE ('2015-10-20', 'YYYY-MM-DD')) "week day" FROM DUMMY;
    SELECT YEAR (TO_DATE ('2011-05-30', 'YYYY-MM-DD')) "year" FROM DUMMY;

  • 相关阅读:
    【Boost】boost库asio详解5——resolver与endpoint使用说明
    VS路径定义
    C++ Primer 第二章 学习笔记
    C++ Primer 第三章 学习笔记
    C++ dll的隐式与显式调用
    BOOST编译方法
    Real World CTF一日游
    蝉知CMS5.6反射型XSS审计复现
    关于MJ刷新的报Too many arguments to function call, expected 0, have *问题
    XIB做适配(二)
  • 原文地址:https://www.cnblogs.com/csjoz/p/16104968.html
Copyright © 2020-2023  润新知