Best way to convert JavaScript date to .NET date

前端 未结 5 960
清歌不尽
清歌不尽 2021-02-05 11:20

I have a date in JavaScript and its value is coming like this

Fri Apr 01 2011 05:00:00 GMT+0530 (India Standard Time) {}

Now what is the best way to convert th

5条回答
  •  南旧
    南旧 (楼主)
    2021-02-05 11:38

    You can convert your time to string before you send it and in the .net you should convert a string into datetime using one of datetime constructor. Datetime .net -> http://msdn.microsoft.com/en-us/library/system.datetime(v=VS.90).aspx You can use also a DateTime.Parse method -> http://msdn.microsoft.com/en-us/library/ms973825.aspx But you should deliver a correct form of string to server

提交回复
热议问题