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
Post a Comment