Thursday 7 March 2019

Few common functions related to Query and dates

Today, I will be discussing about few of the common methods related to query and dates.

Let's begin with it.

Date  related methods 

 -  Year(date  _date) : Method will be used to get year from specified date.
-   mkdate(int _day, int _month, int _year) : Method will be used to make and return a new date
-   mthOfYr(date _date) : Method will be used to get month from the the specified date parameter.
-   dayOfMth(date _date) : Method will be used to get day of the month from the specified date parameter.


Query  related methods 

QueryBuildRange         startAndEndDateRange ;

startAndEndDateRange = this.query().dataSourceTable(tableNum(EmplSickLeaveEncashment)).addRange(FieldNum(EmplSickLeaveEncashment, NextEncashDate));
startAndEndDateRange.value(SysQueryRangeUtil::dateRange(startDate,toDate));
startAndEndDateRange.status(RangeStatus::Hidden);

Here for adding date range we can using dateRange method from SysQueryRangeUtil class.
In order to hide range we can set its status to Hidden by using method of status.


No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Connect and upload in azure blob with azure key vault using x++

 Today, I will be sharing details about file upload in azure blob using azure vault that includes pre requisite and code snippet used to it....