use DateUtils;
Edit1.Text:=intToStr(MonthsBetween(StrToDateTime(‘2012-10-2‘),StrToDateTime(‘2012-5-1‘)));
Edit1.Text:=intToStr(MonthsBetween(DateTimePicker2.Date,DateTimePicker1.Date));
时间: 2024-10-24 23:28:40
use DateUtils;
Edit1.Text:=intToStr(MonthsBetween(StrToDateTime(‘2012-10-2‘),StrToDateTime(‘2012-5-1‘)));
Edit1.Text:=intToStr(MonthsBetween(DateTimePicker2.Date,DateTimePicker1.Date));