Why can't I check if a 'DateTime' is 'Nothing'?

前端 未结 8 2063
天命终不由人
天命终不由人 2020-12-07 17:18

In VB.NET, is there a way to set a DateTime variable to \"not set\"? And why is it possible to set a DateTime to Nothing, but not<

8条回答
  •  半阙折子戏
    2020-12-07 17:50

    You can check this like below :

    if varDate = "#01/01/0001#" then
           '  blank date. do something.
    else
           ' Date is not blank. Do some other thing
    end if
    

提交回复
热议问题