2017-05-11 14 views

答えて

0

オブジェクトを作成し、このようにそれをラップ:

Public class SampleModel 
{ 
    Public DateTime Start {get; set;} 
} 

、その後のアクションに投稿:

public object postDate(SampleModel sampleModel) 
{ 
    // sampleModel.Start 
    //Save the DateTime to sql Server 
    //return success code or object 

} 

JSONは次のようにする必要があります

{ 
    "Start":"2017-05-11T09:18:54.092Z" 
} 
+0

DateTimeを投稿するときにjson文字列がどのように見えますか? – Olid

+0

私は答えの最後にjsonのサンプルを入れました。 –

+0

おかげで、それは今:) { \t "のStartTime": "2017年5月17日14時04分58秒" \t }大丈夫です ところでこの1つはまた、作業:) – Olid

関連する問題