Syntax for creating formula field with dates

Syntax for creating formula field with dates

Hello Zoho,

I am trying to create a formula field that refers to specific dates. I checked the documentation, but wasn't sure the best way to approach.

Basically, I want the field to return the value "2015-16" if "Due Date" is between 8/1/2015 and 7/31/2016 or I want it to return "2014-15" if "Due Date" is between 8/1/2014 and 7/31/2015.

I also saw that you can't use If...else, but I am following what it says in this posting:  https://help.zoho.com/portal/helpcenter/articles/how-can-i-create-a-formula-number-field-with-the-if-else-statement-25-9-2015

This was my first attempt that says it gets a syntax error:

If(${Tasks.Due Date}>=2015-07-31 Or ${Tasks.Due Date}<=2016-07-31, '2015-16',
If(${Tasks.Due Date}>=2014-08-01 Or ${Tasks.Due Date}<=2015-07-31, '2014-15'))

This is another version that follows what it says here about date data types -  https://www.zoho.com/crm/help/customization/formula-field-data-types.html#DateTime_Data_Type

If(${Tasks.Due Date}>=('July 31, 2015 12:00am') Or ${Tasks.Due Date}<=('August 1, 2016 12:00am') ,
If(${Tasks.Due Date}>=('July 31, 2014 12:00am') Or ${Tasks.Due Date}<=('August 1, 2015 12:00am')))

Here I get an incorrect datatype error.

Any suggestions?

Thanks,
Kim