Hi Lisa,
Thanks to your code examples and a google search looking for “convert timestamp to unix” and some stumbling through, I managed to put this together:
{exp:query sql=“SELECT * FROM exp_weblog_titles WHERE weblog_id=‘7’ AND exp_weblog_titles.entry_date>unix_timestamp(’{segment_3}-{segment_4} 12:00:01’) AND exp_weblog_titles.entry_date<unix_timestamp(‘2008-{segment_5} 12:00:01’)”}
{entry_id} - {title}
{/exp:query}
On the URL, if we have it like so: index.php/tasks/schedule/2008/08-25/08-31
The query will pull entries between 8/25 through 8/31.
This enables us to view date based “reports” or “schedules” on the fly by adjusting dates in URL. Logically, I should have been able to do this with start_on and end_before parameters but they just weren’t playing very nice with what I wanted. This is a good alternative. ![]()
I’m most proud of the fact I am not a programmer at all and managed to figure this out. Couldn’t have figured it out without your code examples, though!
Elise
