When I set Time Stamp Filter format as 'YYYY-MMM-DD', I'm getting the resultant as '2018-May-121'.
Why I'm always getting 21 at the end?
You're not getting an extraneous "21" - you're actually getting "121". May 1st is day 121 of the year (yes, I had to look that up ).
Please use the Java documentation for SimpleDateFormat as a guide:
Capital "D" is for day of the year. Lowercase "d" is for day of the month. The uppercase "Y" might cause problems, too.
Try: "yyyy-MMM-dd" for "2018-May-01" or "yyyy-MM-dd" for "2018-05-01". There are other variations, too.
Yeahhhh... Thank you, Mike. Appreciate much!