Syntax for Year checking and Processing Date

I have a scenario like, I am getting a date field from input in MMDDYY format and I have to check for same year as processing year then I should pass "", else if the input date is to previous year to processing date and less than 0301 then I should pass Y.
How to check and process the date?

Showing Answers 1 - 2 of 2 Answers


  • Apr 8th, 2016

Use date function to get the current date and apply date_year function to get the processing year out of it.
Do the same for input date to get the input year.
If these two are equal set " " to output. Now to check input date is previous year and difference is less than 301 days, use the date_time_difference function to check the difference of days between input date and current date and assign the output accordingly.

  Was this answer useful?  Yes


  • May 12th, 2016

else "Y";

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions