Browse Source

时间比较

Administrator 2 years ago
parent
commit
2365d52bdf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mhotel/src/com/happy/Until/TimeExchange.java

+ 1 - 1
mhotel/src/com/happy/Until/TimeExchange.java

@@ -410,7 +410,7 @@ public class TimeExchange {
      * @throws ParseException
      * @throws ParseException
      */
      */
     public static boolean CompareDate(String dateOne, String dateTwo) throws ParseException {
     public static boolean CompareDate(String dateOne, String dateTwo) throws ParseException {
-        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Date sd1=df.parse(dateOne);
         Date sd1=df.parse(dateOne);
         Date sd2=df.parse(dateTwo);
         Date sd2=df.parse(dateTwo);
         return sd1.before(sd2);
         return sd1.before(sd2);