How to compare two dates FORMATS for saving to DB

前端 未结 3 2090
慢半拍i
慢半拍i 2020-12-11 07:56

I want to compare two date formats and return \"false\" when two formats are not equal.

For example, I get two da

3条回答
  •  忘掉有多难
    2020-12-11 08:24

    Try like

    Dim matcher As Boolean = myString Like "??/??/????"

    28/11/1997; matcher = True BUT 11/28/1997; matcher = True (is also true)

    It works for some patterns but not for everything maybe try splitting the date into more than one variable :)

提交回复
热议问题