Date Comparison is not working correctly

Certified Associate Developer

I am having a column  named due On in the record with data type as date and time,In db the data type for this field is timestamp.I have to add a filter ,having two options one Before or at 7:59 PM Today and After  7:59 PM Today and display this filter and read only grid in a interface
This is the filter code I am writing currently,but it is not working correctly kindly help me regarding this

a!recordFilterList(
name: "SLA Due Date",
options: {
a!recordFilterListOption(
id: "before",
name: "Before or at 7:59 PM Today",
filter: a!queryFilter(
field:'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0}CMGT_Task.fields.{56f4ac00-4b4b-4c1b-b841-1938bd23ac80}dueOn',
operator: "<=",
value: rule!NWS_SlaCutOffTime(),



)
),
a!recordFilterListOption(
id: "after",
name: "After 7:59 PM Today",
filter: a!queryFilter(
field:'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0}CMGT_Task.fields.{56f4ac00-4b4b-4c1b-b841-1938bd23ac80}dueOn',
operator: ">",
value:rule!NWS_SlaCutOffTime(),
)
)
},
allowMultipleSelections: false
)

NWS_SlaCutOffTime(),having code below


datetime(

year(today()),
month(today()),
day(today()),
19,59,00
),

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    a!recordFilterList(
      name: "SLA Due Date",
      options: {
        a!recordFilterListOption(
          id: "before",
          name: "Before or at 7:59 PM Today",
          filter: a!queryFilter(
            field:'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0}CMGT_Task.fields.{56f4ac00-4b4b-4c1b-b841-1938bd23ac80}dueOn',
            operator: "<=",
            value:  rule!NWS_SlaCutOffTime(),
             
              
            
          )
        ),
        a!recordFilterListOption(
          id: "after",
          name: "After 7:59 PM Today",
          filter: a!queryFilter(
            field:'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0}CMGT_Task.fields.{56f4ac00-4b4b-4c1b-b841-1938bd23ac80}dueOn',
            operator: ">",
            value:rule!NWS_SlaCutOffTime(),
          )
        )
      },
      allowMultipleSelections: false
    )
    


    NWS_SlaCutOffTime(),having code below

     datetime(
       year(today()),
       month(today()),
       day(today()),
       19,59,00
     ),

  • 0
    Certified Lead Developer
    in reply to mohiniv1048

    and can you clarify exactly on what you mean when you say "not working correctly"?

    1. what have you tried
    2. what result did you expect
    3. what result did you see instead
Reply Children
No Data