首页 > 解决方案 > 在 DolphinDB 中使用 datehour() 函数的问题

问题描述

GUI中的代码:

datehour(2018.09.03 8:30:00)

运行时错误:

2020.12.09 17:14:24.420: executing code ...
Both arguments of 'pair' must be a scalar

为什么?

标签: dolphindb

解决方案


如果使用函数 datehour(),则其参数中的月、日、时、分、秒必须包含两位数。正确的代码如下所示:

datehour(2018.09.03 08:30:00)

结果是:

2018.09.03T08

推荐阅读