SQLite3中的TIMESTAMP类型的EXTRACT

umu*_*rax 2 sqlite

对于时间戳类型(ref),SQLite3似乎不支持提取函数.例如;

select
 extract(year from l_shipdate) as l_year
from
 ...
Run Code Online (Sandbox Code Playgroud)

出现以下错误; 错误:靠近"from":语法错误

我想知道在SQLite3中是否有另一种方法可以做到这一点(或者通过重写SQL查询).

提前致谢,

Pen*_*m10 6

试试这个

select strftime('%Y', l_shipdate) as l_year from...
Run Code Online (Sandbox Code Playgroud)