LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Display data for greater than a certain date

    Employee
    Posted 10-03-2011 21:16

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Rapkat

    I have 2 fields:

    Field 1 contains list of addresses
    Field 2 contains a date 2001-03-01 etc

    I want to filter by dates greater than 2011-08-01 for Field 2

    How can I do this?


  • 2.  RE: Display data for greater than a certain date

    Employee
    Posted 10-03-2011 21:19

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    Originally posted by: Rapkat
    					

    I have 2 fields:

    Field 1 contains list of addresses
    Field 2 contains a date 2001-03-01 etc

    I want to filter by dates greater than 2011-08-01 for Field 2

    How can I do this?
    Use this code in a filter:


    emit *
    where date(Field2,"CCYY-MM-DD") > date(2011,08,01)


  • 3.  RE: Display data for greater than a certain date

    Employee
    Posted 10-04-2011 19:57

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Rapkat

    Use this code in a filter:


    emit *
    where date(Field2,"CCYY-MM-DD") > date(2011,08,01)


    Hi

    I used a filter

    emit *
    where date(Event_Date,"CCYY-MM-DD") > date(2011,08,01)
    Event_Date being the field I wish to use (one step before I had changed the field type to a date but it has an error:


    ERROR processing data:
    Expect string or unicode argument

    Installing log (10/05/2011 15:47:18) ...
    2011-10-05 15:47:18; Level: 2; Type: 0; Desc: "Expect string or unicode argument"; File: "\src\brain_d\ra_dev\code\source\expert\ToDate_Exp rOp.cpp"; Line: 119; Context: "Salmon::NED::ToDate_ExprOp::_apply()"
    2011-10-05 15:47:18; Level: 2; Type: 0; Desc: "...exception seen in operator <date>"; File: "\src\brain_d\ra_dev\code\source\expert\ExprOperat or.cpp"; Line: 34; Context: "Salmon::NED::ExprOperator::apply()"
    2011-10-05 15:47:18; Level: 2; Type: 0; Desc: "...exception seen in expression (date ...) starting on line 3"; File: "\src\brain_d\ra_dev\code\source\expert\Combinatio n_Expr.cpp"; Line: 210; Context: "Salmon::NED::Combination_Expr::evaluate()"
    2011-10-05 15:47:18; Level: 2; Type: 0; Desc: "...exception seen in operator <>>"; File: "\src\brain_d\ra_dev\code\source\expert\ExprOperat or.cpp"; Line: 34; Context: "Salmon::NED::ExprOperator::apply()"
    2011-10-05 15:47:18; Level: 2; Type: 0; Desc: "...exception seen in expression (> ...) starting on line 3"; File: "\src\brain_d\ra_dev\code\source\expert\Combinatio n_Expr.cpp"; Line: 210; Context: "Salmon::NED::Combination_Expr::evaluate()"
    2011-10-05 15:47:18; Level: 2; Type: 0; Desc: "...exception seen"; File: "\src\brain_d\ra_dev\code\source\expert\BrainScrip tSet_ExprStmt.cpp"; Line: 80; Context: "BrainScriptSet_ExprStmt::_evaluate()"
    2011-10-05 15:47:18; Level: 2; Type: 0; Desc: "...exception seen in statement 'bs-set', line 3"; File: "\src\brain_d\ra_dev\code\source\expert\ExprStatem ent.cpp"; Line: 56; Context: "Salmon::NED::Statement_Expr::evaluate()"
    2011-10-05 15:47:18; Level: 2; Type: 0; Desc: "...exception seen in context: { 0(in1):2 }"; File: "\src\brain_d\ra_dev\code\source\brain\ExprTableIo .cpp"; Line: 255; Context: "Salmon::ExprTableIo::processInputRows()"
    Uninstalling log (10/05/2011 15:47:18) ...


    What have I done wrong?


  • 4.  RE: Display data for greater than a certain date

    Employee
    Posted 10-04-2011 20:22

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: mermacora

    It looks like your input field Event_Date is already a date type. In this case, this script should work:

    emit *
    where Event_Date > date(2011,08,01)