How to setup Dynamic Date in Batch job

Hi All,

I have to set Dynamic date in Batch job, Scenario is this:

set Date range(01-01-2018…31-01-18) if current month January

Set Date Ragne(01-02-2018…28-02-2018) if current month February…like that.

I have to create one batch for whole year for sales invoice.

Now i have to run this batch job daily and captured whole month sales invoice data without changing date in batch job parameter manually.



Use (monthRange()).

Please don’t remove the parenthesis; this is syntax for calling methods of SysQueryRangeUtil class.