Chris Beaumont wrote:
> Hello,
>   I'm using dtml-in to display a long list of events taken from a SQL
> table, as part of a calendar, using batch processing,
> (basically the example from the DTML reference adapted to use direct
> traversal to fetch the table contents)
> I want my calendar to be basically a timeline, with the current date as
> the default starting point. The idea is that someone can go back in time
> as well as forward. (links for past events as well as future)
> So, basically, I'm looking for a not-too-convoluted (i.e. decent
> performance) way to have the 'default' screen on entry be the batch that
> contains the item whose datetime value is the next one occurring after
> the current time. Dtml-in doesn't seem to have a straightforward way to
> do this, unless I'm overlooking something obvious.
>  Does a solution to this occur to anyone?

do it in sql, this is pretty database dependent, but the ideal way to me
would be just 

where event_date > <dtml-var TimeArguement fmt=dbdateformat>

and just adjust your dtml to call the method with a date arguement.

you probably need to use your db's string->date functions to convert the
value for comparisions.

i think this would offer the best performance, and least code.



Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to