Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

DolphinDB按时间(datetime类型)查询时有时间范围限制吗?

我在DolphinDB执行下述查询语句时出现问题:

s1 = select * from tb where trading_day <= 2020.10.29 and trading_day >= 2010.10.29 
s2= select * from tb where trading_day <= 2120.10.29 and trading_day >= 2010.10.29 

我第一个日期范围是【2010.10.29,2020.10.29】有数据,
为什么第二个范围【2010.10.29,2120.10.29】反而没数据了?
第一个范围包含在第二个范围内的啊?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

DATETIME类型在DolphinDB内部用32位有符号整数表示。32位有有符号整数最大值为2147483647,转换成datetime(2147483647)=2038.01.19T03:14:07。因此2120.10.29超出了上限。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...