Shortest way to compare 2 dates in dd/mm/yyyy format

后端 未结 7 1232
轻奢々
轻奢々 2021-01-20 23:44

can anyone suggest the neatest way to do this comparison? I need to test if a date provided in dd/mm/yyyy format is less than a fixed date, e.g 01/05/2009 - I know I can convert

相关标签:
7条回答
  • 2021-01-21 00:40

    use this method

    yearmonthday

    you have 01.05.2010 and 03.07.2010

    and to compare : 20100501 <= or => 20100703

    0 讨论(0)
提交回复
热议问题