SQL query for today's events

  • Could someone please tell me the SQL query to select today's events from a calendar? I'm writing a Perl script and I've got stuck trying to isolate "today".

    I would like to show all events from today, no matter what time during the day they start and finish. I had tried to build this into my script by firstly defining today's Perl time at 00:01 and 23:59 and then comparing them to the event's dateline_from and dateline_to columns. I can't get this to deal with recurring events though.

    Anyway, now I think I'm doing this all wrong and there must be a better way.

    Thanks.


  • vBulletin stores dates as unix timestamps. Make sure you converted the perl date/times to unix timestamps. Alternativly you could use an SQL function that converts datetimes to unix timestamps (check the manual, i cant remember :))


    A condition would be something like

    WHERE dateline < END_OF_TODAY AND dateline > START_OF_TODAY







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about SQL query for today's events , Please add it free.