Warning: strpos() [function.strpos]: needle is not a string or an integer in /home/beardedd/public_html/home/index.php on line 61
hOme.beardedDonkey - SQLite How to select a particular day of the week using date function
SQLite How to select a particular day of the week using date function 
This will select last Thursday's date:

SELECT date('now', 'weekday 4', '-7 days')


weekday 4 = Thursday, but if we want last week we have to -7 days from it.

If you want the date to be returned as unix epoch value, do the following:

SELECT strftime('%s', date('now', 'weekday 4', '-7 days'))


[ view entry ] ( 42 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 84 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>