Add days in date query

Posts   
 
    
Anderskj1
User
Posts: 33
Joined: 11-Jan-2005
# Posted on: 08-Jul-2005 12:12:08   

Hi

I'm am in the beginning fase of creating a Scheduler module for an application. We have used LLBLGen through the whole application.

But I can“t see how I can do the follwing with LLBL. (I want to let the database do the job)

In pseduo SQL

select * from booking where "tablefield.creationdate+3 month" > parameter.today

So I want to add a timespan to a date field on the database and then filter on the result by the predicate.

Is that possible?.(I really hope!) If so can you give a hint? simple_smile

Thanks Alot!

Anders, Denmark

Rogelio
User
Posts: 221
Joined: 29-Mar-2005
# Posted on: 08-Jul-2005 14:23:05   

Hi,

You can try:

date = today - 3 month

"tablefield.creationdate" > date

Anderskj1
User
Posts: 33
Joined: 11-Jan-2005
# Posted on: 10-Jul-2005 22:36:03   

How does that map to LLBLGen? I might have misunderstood your answere or the otherway around. Thanks

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 11-Jul-2005 10:26:33   

Anderskj1 wrote:

How does that map to LLBLGen? I might have misunderstood your answere or the otherway around. Thanks

I think he meant:


DateTime date = DateTime.Now().AddMonths(-3);

and then pass 'date' as the value for a CompareValue predicate on creationdate simple_smile

Frans Bouma | Lead developer LLBLGen Pro