2014-10-16 27 views
1

我使用KDB + 3.2(32位),而我似乎无法与日期比2290.12.31更大,以执行表达式:如何在KDB中输入晚于2290.12.31的日期?

q) 2291.01.01 
An error occurred during execution of the query. 
The server sent the response: 
2291.01.01 

任何想法,为什么,以及如何解决?

+0

这可能有助于了解*为什么*您需要日期到目前为止。 – 2014-10-16 17:51:11

+0

在我的财务数据集中,有一些罕见的情况,其中[债券](http://en.wikipedia.org/wiki/Bond_(finance))的到期日晚于2290.12.31' – mchen 2014-10-16 17:57:21

回答

1

由于日期内部存储为整数,因此我可以使用下面的方式创建2291.01.01。

q)\`date$106285 
2290.12.31 
q)\`date$106286 
2291.01.01 
q)type `date$106286 
-14h 
+0

谢谢!但奇怪为什么必须以这种复杂的方式来完成...... – mchen 2014-10-18 13:56:31