Predicate Filter by Date Format

Posts   
 
    
shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 17-Dec-2010 11:06:08   

LLBLGEN 3.0 Release 8th December Oracle 9i/10g MSORACLE

Please ref the following code

bucket.PredicateExpression.Add(new FieldCompareNullPredicate(OrderFields.OrderDate, null));

If I want to filter in format 'dd/mm/yyyy' minus time how do i do it ?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 17-Dec-2010 22:24:09   

shekar wrote:

bucket.PredicateExpression.Add(new FieldCompareNullPredicate(OrderFields.OrderDate, null));

This will produce: WHERE... OrderDate IS NULL. I dont now if that is related to your question.

shekar wrote:

If I want to filter in format 'dd/mm/yyyy' minus time how do i do it ?

What is the approximate SQL you want to produde?

For instance, if you have a datetime in DB but you just want to compare the date part, you can invoke the Oracle's TRUNCATE function trough a LLBLGen DBFunctionCall.

David Elizondo | LLBLGen Support Team
shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 18-Dec-2010 07:14:09   

daelmo wrote:

shekar wrote:

bucket.PredicateExpression.Add(new FieldCompareNullPredicate(OrderFields.OrderDate, null));

This will produce: WHERE... OrderDate IS NULL. I dont now if that is related to your question.

shekar wrote:

If I want to filter in format 'dd/mm/yyyy' minus time how do i do it ?

What is the approximate SQL you want to produde?

For instance, if you have a datetime in DB but you just want to compare the date part, you can invoke the Oracle's TRUNCATE function trough a LLBLGen DBFunctionCall.

Thanks this was the one TRUNCATE function