我是xquery的新手,其中一个要求是通过查询xDB生成每日报告.
如果我硬编码日期,我可以从xDB生成报告,但如果我尝试从系统中读取当前日期,我在报告中没有得到任何值.
代码片段:
let $day := fn:current-date()
let $hours := ( '00', '01', '02', '03', '04',
'05', '06', '07', '08', '09',
'10', '11', '12', '13', '14',
'15', '16', '17', '18', '19',
'20', '21', '22', '23' )
let $ddhh := for $i in $hours return concat($day,"T",$i)
let $title := concat("Average Time By Documents in Hour on ", $day)
Run Code Online (Sandbox Code Playgroud)
在报告中:(" 2015-06-08Z小时文件平均时间"..)
硬编码值和current-date()函数之间的差异是时区"Z".如何摆脱时区"Z".我只想在变量$ day中说"2015-06-08"而不是"2015-06-08Z"
提前致谢.
xquery ×1