Converting date to specified format and two date comparisions

后端 未结 2 937
北恋
北恋 2021-01-28 09:03

Given Two Dates:

$Date1

format: yyyy-mm-dd hh:mm:ss eg:  2013-05-21 07:47:21

$Date2



        
2条回答
  •  迷失自我
    2021-01-28 09:40

    Parse the date using regular expressions and use the Time::Local functions to convert into seconds past 1 Jan 1970 to compare integers.

提交回复
热议问题