1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Filter by Date Field for Date type appears broken for Locale English (United Kingdom)

Discussão em 'PSDN - Forum' iniciado por Charles Ford, Junho 26, 2017.

  1. Charles Ford

    Charles Ford Guest

    Hello,

    My Task Object has Attribute Task and receives a Due Date of Type Date.

    In my Search Component I enable the Filter by Date Field but no records are returned when I use 'Last 30 Days' for example despite records existing that meet the criteria.

    Logging the SQL to query.log appears to show the problem...

    SELECT COUNT(A.OBJ_ID) FROM RB_OBJ_DATA A WHERE A.OBJ_DEF_ID=5264943 AND A.EVENT_DATE>=STR_TO_DATE('27.05.2017', '%m/%d/%Y') AND A.EVENT_DATE<STR_TO_DATE('26.06.2017', '%m/%d/%Y')

    The format looks to have the wrong separators and locale.

    Rewriting the query format strings and manually running from System:

    SELECT COUNT(A.OBJ_ID) FROM RB_OBJ_DATA A WHERE A.OBJ_DEF_ID=5264943 AND A.EVENT_DATE>=STR_TO_DATE('27.05.2017', '%d.%m.%Y') AND A.EVENT_DATE<STR_TO_DATE('26.06.2017', '%d.%m.%Y')

    Query Results
    Column Settings
    COUNT(A.OBJ_ID)
    8

    Additionally using Created At causes the following Query to be emitted (although this returns records it doesn't achieve the required functionality)...

    SELECT COUNT(A.OBJ_ID) FROM RB_OBJ_DATA A WHERE A.OBJ_DEF_ID=5264943 AND A.CREATED_AT>=STR_TO_DATE('05/26/2017 23:00:00', '%m/%d/%Y %H:%i:%s') AND A.CREATED_AT<STR_TO_DATE('06/25/2017 23:00:00', '%m/%d/%Y %H:%i:%s')

    Regards

    --

    Charles.

    Continue reading...

Compartilhe esta Página