Custom date comparison

xiaoxiao2021-03-06  68

A netizen suddenly asked questions, and the test was given to him.

I also collect themselves.

:)

SimpleDateFormat Format = New SimpleDateFormat ("YYYY-MM-DD HH: MM: SS"); string a = "2004-02-23 8:30:00"; string b = "2004-02-23 9:12:00 "; DATE D1 = format.Parse (a); DATE D2 = format.Parse (b); system.out.println (D1.Befor (D2));

转载请注明原文地址:https://www.9cbs.com/read-106646.html

New Post(0)