0

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.

2
  • Does this help? stackoverflow.com/a/28219557/1450855 Commented Aug 16, 2017 at 14:12
  • Clear problem I post "dd/MM/yyyy" but server reads null or "MM/dd/yyyy" =>x when I compare x with Datetime .now => server give me that x is later than now but reality = > x is < Datetime.now Commented Aug 16, 2017 at 14:27

1 Answer 1

1

Post your date/time formatted in the ISO standard.

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

Post dateString to your api.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.