#两个日期相隔多少天,例:2008-10-03和2008-10-01是相隔两天 def datediff(beginDate,endDate): format="%Y-%m-%d"; bd=strtodatetime(beginDate,format) ed=strtodatetime(endDate,format) oneday=datetime.timedelta(days=1) count=0 while bd!=ed: ed=ed-oneday count+=1 return count
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/8352.html