Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Issue AdvancedCriteria with DateTime Fields

    SmartGWT Power Edition - Nightly 07 Nov. 2010

    It seems the maximal precision of a date conversion in an advanced criteria is a day, but in the datasource the field type is datetime. In this case I expected for the date conversion the precision of a datetime field.


    DataSource
    Code:
    <field name="lsk_valid_from" type="datetime" detail="true"/>				
    <field name="lsk_valid_to" type="datetime" detail="true" />
    Criteria
    Code:
    AdvancedCriteria c = new AdvancedCriteria();
    c.addCriteria(Consts.F_LSK_VALID_FROM,
    OperatorId.LESS_OR_EQUAL, assignedDate									.getValueAsDate());
    				
    c.addCriteria(Consts.F_LSK_VALID_TO,
    OperatorId.GREATER_OR_EQUAL, assignedDate
    .getValueAsDate());
    Created Statment
    Code:
    AND (lsk_valid_from <= To_Date('2010-12-10','yyyy-mm-dd') OR lsk_valid_from IS NULL) AND (lsk_valid_to >= To_Date('2010-12-10','yyyy-mm-dd') AND lsk_valid_to IS NOT NULL)))
    Expected Statement (or similar):
    Code:
    AND (lsk_valid_from <= To_Date('2010-12-10 22:15','yyyy-mm-dd HH24:MI') OR lsk_valid_from IS NULL) AND (lsk_valid_to >= To_Date('2010-12-10 22:15','yyyy-mm-dd HH24:MI') AND lsk_valid_to IS NOT NULL)))
    Regards
    Chris

    #2
    This problem was reported and fixed last month - please try it with a more recent nightly build (later than November 11th 2010)

    Comment


      #3
      Thanks, I tried the nightly 12.12.2010 and the problem is solved.

      Comment

      Working...
      X