How do you get the server DateTime in Silverlight in SharePoint 2010?
To get the current local time in Silverlight (as well as in regular .NET) you can use:
To convert the DateTime to ISO 8601 DateTime format (for instance to use the DateTime value in a CAML query) you can use:
If you send a DateTime to the server in local time, the server will convert the time value into it's appropriate time zone. The best way to not have to deal with this at all is to use UTC time.
See DateTime Time zone problem for a discussion about this in relation to Silverlight.
|show 1 more comment|
To do this you would need to make a service call, you will receive the datatime in the returned XML. Take a look here for a starter on MSDN