I have two tables where column [date]
is type of DATETIME2(0)
.
I have to compare two records only by theirs Date parts (day+month+year), di
For Compare two date like MM/DD/YYYY to MM/DD/YYYY . Remember First thing column type of Field must be dateTime. Example : columnName : payment_date dataType : DateTime .
after that you can easily compare it. Query is :
select * from demo_date where date >= '3/1/2015' and date <= '3/31/2015'.
It very simple ...... It tested it.....