Why the date selected by user in aras form is different from the date in database?
According to the shown language you seem to live in a Spanish speaking country. Inside the SQL database dates and times are stored in neutral UTC format. In Innovator then these neutral dates are then converted to your local time zone. This way all your users around the globe work with the same data and times.
In your case the day is different, so I assume you were already 2 hours ahead of UTC, this is why the 13th was stored instead of the 14th.
If i am getting what you want, you can make use of strtotime function. It converts datetime string passed to it to Unix timestamp which you can use for comparison.
If date from datepicker is 21-10-2015 then the function will return 1445385600 and if the date stroed in db is 2015-10-21 then also the function will return 1445385600 so you can comapre the two easiyl.