Just use myDate.ToUniversalTime()
If you mean that the value in your DateTime is actually the UTC time, but the kind is set to Local, then you will have to convert it to UTC.
var myUtcDate = DateTime.SpecifyKind(myDate, DateTimeKind.Utc);
Unfortunately, this is a general problem with the .NET DateTime class and SQL, not anything specific to MVC. I don't know of any way to get the DateTime in UTC format with DateTimeKind.Utc set.
You may want to read John Skeets rant about DateTime.
http://noda-time.blogspot.com/2011/08/what-wrong-with-datetime-anyway.html
If you need to use this frequently, one option would be to create an extension method to do this.
public static class DateTimeExtensions {
public static DateTime MakeUtcKind(this DateTime dateTime) {
return DateTime.SpecifyKind(dateTime, DateTimeKind.Utc);
}
}
Then you can simply do this:
var createDate = Membership.GetUser(id).CreationDate.MakeUtcKind();