ColdFusion Programmer wrote:
> Hi Jochem, Can you explain what the where statement in your code
> does, I don't understand the the "EXTRACT(DAYS FROM
> CURRENT_TIMESTAMP - DateTime) < 7" bit

Read it inside out:

CURRENT_TIMESTAMP       -> the current date and time, 'now'
DateTime      -> your field with the moment of the search, 'then'
CURRENT_TIMESTAMP - DateTime      -> the interval between now and then
EXTRACT(DAYS FROM ..)      -> the number of whole days in that interval

So what it says is that DateTime should be less than 7 days in the
past in standard SQL syntax. If your database does not support
standard SQL syntax, you might have to rewrite it in something your
database understands, but that should be explained in the manual.

Jochem


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to