Vicky_K
(Vicky K)
May 1, 2023, 1:21pm
1
Hi All,
Just assign a date time variable and I give the value as nothing
But while right the out put it shows the output as 01/01/0001 00:00:00
I need output if we give date value then I need that one there is empty means it returns empty value
But here I have above issue can you give me solution for this…
Thanks,
Vicky
normally for date the default value will be output
it is normal behavior instead you check for the value then based on that you can decide
the next steps
Regards
1 Like
Hi @Vicky_K ,
As already mentioned above, we would need to go ahead with Date Comparison if you are assigning Nothing
to it as value.
For that Purpose, we can compare the Date variable you have assigned with Nothing is equal to DateTime.MinValue
or not, as both values would be the same :
2 Likes
Nitya1
(Nitya Tomar)
May 1, 2023, 5:44pm
4
Hi @Vicky_K
Try this-
If myDateTime.Equals(DateTime.MinValue) Then
// DateTime variable is empty
Else
// DateTime variable has a value
End If
Thanks,
system
(system)
Closed
May 9, 2023, 9:11am
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.