How to compare to String Date Formats in java?

前端 未结 4 863
被撕碎了的回忆
被撕碎了的回忆 2021-01-24 16:16

I am getting input as two types.

1.String date1 = \"07/01/2017\";
2.String date2 = \"\"2017-01-12 00:00:00.0\";

How to compare two date formats

4条回答
  •  佛祖请我去吃肉
    2021-01-24 16:56

    If you want to know if the date is in format mm/dd/yyyy or mm-dd-yyyy or something in the same idea, you probably need to use regex expressions.

    You can check this for a way to implement it What is the regular expression for Date format dd\mm\yyyy?

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题