i have a full datetime object that i need to pass in as a parameter in a URL.
what is the best way to do this so it fully can get converted to a csharp DateTime object 开发者_如何学Pythonand not lose any precision ?
pass it as a Ticks
. and convert the Ticks
back to DateTime. Ticks
is a long datatype and datetime accepts long
datatype to be converted to DateTime
For example, in mvc, your url looks like this myweb.com/Pass/Date/634164331846947633
you can get the 3rd segment of your url which is by default id
and convert it to DateTime
.
精彩评论