How do I convert this C# line of code to a TimeSpan from Nullable TimeSpan as DateStamp is Nullable DateTime
TimeSpan? timestamp = DateTime.Now - modelXyz.DateStamp
TimeSpan? timestamp = DateTime.Now - modelXyz.DateStamp;
if(timestamp.HasValue)
{
TimeSpan nonNullableTS = timestamp.Value;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With