|
Loading...
|
sqlite-users@sqlite.org
[Prev] Thread [Next] | [Prev] Date [Next]
[sqlite] cross-database time function. Israel Brewster Mon Dec 28 10:00:07 2009
I am looking for a cross-database (SQLite, PostgreSQL, MySQL) method of extracting the time portion of a timestamp. I can't just use the "time()" function, because in PostgreSQL it needs to be in quotes (or preceded by pg_catalog.) to work, while in SQLite quoting the function returns an error. It was suggested that I use a cast(timestamp_column as time) function, but while this works in PosgreSQL, in SQLite it returns the year of the timestamp, not the time. Is there a way to make the cast function actually return the time in SQLite? Or perhaps some other way to extract the time of a timestamp that works in all three databases? Thanks. ----------------------------------------------- Israel Brewster Computer Support Technician II Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 ----------------------------------------------- _______________________________________________ sqlite-users mailing list [EMAIL PROTECTED] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
- [sqlite] cross-database time function. Israel Brewster 2009/12/28 <=
- Re: [sqlite] cross-database time function. Simon Slavin 2009/12/28
- Re: [sqlite] cross-database time function. Israel Brewster 2009/12/28
- Re: [sqlite] cross-database time function. Alexey Pechnikov 2009/12/28
- Re: [sqlite] cross-database time function. Simon Slavin 2009/12/28
- Re: [sqlite] cross-database time function. Alexey Pechnikov 2009/12/29