Find timestamp difference in day in kdb
Depending on the accuracy you require you could simply do
(`date$d1)-`date$d2 to check the difference of dates in days. If you are concerned with exact periods of 24 hours then the logic must be extended to include the time elements of the timestamp:
Which checks to see if 24 hours have passed on the last day.
Alternatively you can compare the number of 24 hour increments in each timestamp by dividing by
1D00:00 and using
floor; as in the following function:
作者: Thomas Smyth 发布者: 28.12.2017 11:02