开发者

Sqlite WHERE condition on JULIAN dates?

How to build a sql where clause on a Julian column date?

SELECT * FROM Products WHERE JulianDateColumn > ?

I can't build a working statement I got either no results with a GreaterThan ">" operator or everything with a SmallerThan "<"

I tr开发者_StackOverflow社区ied with parameters letting Air (Adobe) handle it. I also tried without parameters with string (because of this post):

JulianDateColumn > '2010-04-02 02:02:02' 

or date object

JulianDateColumn > date('now')

All example that I have been able to found, works for date in string (TEXT column) or Unix Time (INTEGER column)

And I can't store my date in any other formats than Julian for compatibility reasons...


ANSWER to my problem :

SELECT * FROM Products WHERE JulianDateColumn > julianday('now') -1 

And wow! It worked!

At least building the question has helped me see the obvious!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜