Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Datomic从instant获得年份_Datomic - Fatal编程技术网

Datomic从instant获得年份

Datomic从instant获得年份,datomic,Datomic,我有一个instant类型的属性,我想查询年份 [:find ?year :where [?t :x/date ?date] [((fn [dt] (+ (.getYear dt) 1900)) ?date) ?year]] 有没有更好的方法来执行此查询?对不起,我不明白问题的关键,您是否关心性能?

我有一个instant类型的属性,我想查询年份

[:find ?year
 :where
 [?t :x/date ?date]
 [((fn [dt] (+ (.getYear dt) 1900)) ?date) ?year]]

有没有更好的方法来执行此查询?

对不起,我不明白问题的关键,您是否关心性能?