浏览代码

HUE-5793 [editor] Trunc() UDF documentation should list all the available formatting formats

Adrian Yavorskyy 8 年之前
父节点
当前提交
7c27db0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/static/desktop/js/sqlFunctions.js

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/sqlFunctions.js

@@ -1403,7 +1403,7 @@ var SqlFunctions = (function () {
         returnTypes: ['TIMESTAMP'],
         arguments: [[{type: 'TIMESTAMP'}], [{type: 'STRING'}]],
         signature: 'trunc(TIMESTAMP date, STRING unit)',
-        description: 'Strips off fields and optionally rounds a TIMESTAMP value.'
+        description: 'Strips off fields and optionally rounds a TIMESTAMP value. The unit argument value is case-sensitive. This argument string can be one of: SYYYY, YYYY, YEAR, SYEAR, YYY, YY, Y: Year. Q: Quarter. MONTH, MON, MM, RM: Month. WW, W: Same day of the week as the first day of the month. DDD, DD, J: Day. DAY, DY, D: Starting day of the week. (Not necessarily the current day.) HH, HH12, HH24: Hour. A TIMESTAMP value truncated to the hour is always represented in 24-hour notation, even for the HH12 argument string. MI: Minute.'
       },
       unix_timestamp: {
         returnTypes: ['INT'],