Giuseppe Costanzi <[EMAIL PROTECTED]> wrote:
> How  extract the month and/or year from a datetime field?
> For example:
>
> SELECT OrderID,OrderDate
> FROM tblOrders

select OrderID, strftime('%m', OrderDate) as Month, strftime('%Y', 
OrderDate) as Year
from tblOrders;

http://sqlite.org/lang_datefunc.html

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to