How to compare two dates in spotfire using ironpython

I am trying to compare current date to some static dates and check if it is greater than the current day or not but it is not working and below is the code and reason. Please suggest how to compare current date with some static date.


d = DateTime.Now

if d > 10/15/2017 and d < 11/15/2017:
    print d
print d
print d > 9/15/2017
print 10/31/2017 > 9/15/2017
print 10/15/2017

Result is:

10/31/2017 6:37:50 AM




(1) Answer