Hi all,
In the Select query button’s criteria (on a dialog) for filtering the data, I need to find the records dating to the previous month from the selected date. What function do i use in the criteria?
Hi all,
In the Select query button’s criteria (on a dialog) for filtering the data, I need to find the records dating to the previous month from the selected date. What function do i use in the criteria?
You can create a method on SysQueryRangeUtil class
like this
public static date currentPrevDate()
{
return prevMonths(systemDateGet());
}
and on the range set this value
(currentPrevDate())
systemDateGet() will give me the system date right. Is it possible for me to input the selected date and check the previous month from that selected date.
As in:
today’s date: 11/08/2016
selected date: 06/06/2016
so i would want the month prior to 06/06/2016 when the system date is today’s date.
Of course you only need to modify previos methods for example with this modification you get previos months of your range
public static date currentPrevDate(TransDate _transDate)
{
return prevMonths(_transdate);
}
and on the range set this value
(currentPrevDate(11/08/2016))
it 'll return 11/07/2016 to your query
okay, yea that makes sense.
Thanks XBB.