Ahmed Halawa
Ahmed Halawa

Reputation: 33

Comparing two datetime

I send a datetime using query $post to Mvc Controller;

1- On the server machine it doesn't bind well , some time in wrong format I solved it by sending datetime as string then split the string to day, month , year.

2- Second problem; I parsed the datetime but when I compare it with another one it gives me wrong result.

Upvotes: 0

Views: 103

Answers (1)

GeekyMonkey
GeekyMonkey

Reputation: 13024

Post your date/time formatted in the ISO standard.

var myDate = new Date();
var dateString = myDate.toISOString();

Post dateString to your api.

Upvotes: 1

Related Questions