Hi I have a scenario wherein I am displaying data in a grid on SAIL f

Hi

I have a scenario wherein I am displaying data in a grid on SAIL form via. a!queryEntity.
I have to provide two filters to user of Start date and End date (both calendars) which actually will query the same column in my DB whose type is timestamp i.e. between the range of this start and end date selected, the data will be filtered in the grid.

If I try to achieve this via. where(search(....)) on a!queryEntity I get an output where my date in DB is equal to the date selected in user filter.

So I guess I need to do it via. a!queryEntity as a number of operators are available here, but not able to figure it out how to do the same.

Can any one please guide me how to achieve this functionality.

Thanks in advance....

OriginalPostID-182998

OriginalPostID-182998

  Discussion posts and replies are publicly visible

Parents
  • Thank you sikhivahans narasimhaadityac for replying!!

    sikhivahans I tried using datetime function but if user selects date 12/30/2015 i.e. 30th December 2015, the datetime function converts it into 12/29/2015 7:00 PM EST.
    Below is the code which will explain my scenario better (1st is the user filter and then I am just displaying the value in text field to view what is actually been returned by datetime function):

    a!dateField(
                        label:"Start Date",
                        value:local!date,
                        saveInto:local!date
                        )
                        
              a!textField(
                        value:if(isnull(local!date),{},datetime(year(local!date), month(local!date),day(local!date),hour(local!date),minute(local!date),second(local!date)))
              )
              

    Irrespective I use or don't use hour(),minute(),second(); I am getting the same result.

    Can you please guide me.

    Thank you in advance!!
Reply
  • Thank you sikhivahans narasimhaadityac for replying!!

    sikhivahans I tried using datetime function but if user selects date 12/30/2015 i.e. 30th December 2015, the datetime function converts it into 12/29/2015 7:00 PM EST.
    Below is the code which will explain my scenario better (1st is the user filter and then I am just displaying the value in text field to view what is actually been returned by datetime function):

    a!dateField(
                        label:"Start Date",
                        value:local!date,
                        saveInto:local!date
                        )
                        
              a!textField(
                        value:if(isnull(local!date),{},datetime(year(local!date), month(local!date),day(local!date),hour(local!date),minute(local!date),second(local!date)))
              )
              

    Irrespective I use or don't use hour(),minute(),second(); I am getting the same result.

    Can you please guide me.

    Thank you in advance!!
Children
No Data