c# - Sending Java date time object to ASP.NET WebApi and storing in SQL Server -


so have android app has user choose date , time. needs send date , time part of it's namevaluepairs .net web api stores data in sql server database table.

what i'm looking on android, how java date time object match c# datetime object may save database. i'm doing (which deciphered posts this:

dateformat dateformat = new simpledateformat("yyyy-mm-dd hh:mm:ss"); date date = new date(2015, 05, 14); 

and

namevaluepairs.add(new basicnamevaluepair("dateandtime", dateformat.format(date))); 

but produces following in sql server

3915-06-14 12:00:00 

should rather sending java date , time count of milliseconds since 1970 here?


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -