System.DateTime? vs System.DateTime

? means that the type is nullable. For details, see e.g. MSDN Nullable is a compiler-supported wrapper around value types that allows value types to become null. To access the DateTime value, you need to do the following: DateTime? dateOrNull = myCalendarExtender.SelectedDate; if (dateOrNull != null) { DateTime newSelectedDate = dateOrNull.Value; }

Can you round a .NET TimeSpan object?

Sorry, guys, but both the question and the popular answer so far are wrong 🙂 The question is wrong because Tyndall asks for a way to round but shows an example of truncation. Will Dean’s answer is wrong because it also addresses truncation rather than rounding. (I suppose one could argue the answer is right … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)