I have a DateTime? variable, sometimes the value is null, how can I return an empty string "" when the value is null or the DateTime value when not null?
I have a DateTime? variable, sometimes the value is null, how can I return an empty string "" when the value is null or the DateTime value when not null?
According to Microsoft's documentation:
The text representation of the value of the current Nullable object if the HasValue property is true, or an empty string ("") if the HasValue property is false.