黄 黄豆 Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-05 #2 now>=incmonth(datone,1) 为比较现在是否大于DATONE一个月。
V Victortim Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-05 #3 >>两个日期大于一个月?? 不是这么容易界定吧? 1,两日期的差大于30 date2-date1>=30 2,两日期在不同两个月, DateTimeToSystemTime(DateTime: TDateTime; var SystemTime: TSystemTime); type PSystemTime = ^TSystemTime; TSystemTime = record wYear: Word; wMonth: Word; wDayOfWeek: Word; wDay: Word; wHour: Word; wMinute: Word; wSecond: Word; wMilliseconds: Word; end; 是哪一种情况,或都不是?
>>两个日期大于一个月?? 不是这么容易界定吧? 1,两日期的差大于30 date2-date1>=30 2,两日期在不同两个月, DateTimeToSystemTime(DateTime: TDateTime; var SystemTime: TSystemTime); type PSystemTime = ^TSystemTime; TSystemTime = record wYear: Word; wMonth: Word; wDayOfWeek: Word; wDay: Word; wHour: Word; wMinute: Word; wSecond: Word; wMilliseconds: Word; end; 是哪一种情况,或都不是?
K Kang Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-05 #4 怎么叫大于一个月? 相差30天以上,还是年份,月份不同? 2000.3.1和2000.2.29算不算?
W wumeng Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-05 #6 declare @firstDate datetime,@date2 datetime SELECT @firstDate=Dateadd(mm,-1,'2000-3-3') SELECT @date2='2000-4-1' if @firstDate>@date2 SELECT @firstDate='1998-08-08' else SELECT @firstDate='1998-01-01' SELECT @firstDate
declare @firstDate datetime,@date2 datetime SELECT @firstDate=Dateadd(mm,-1,'2000-3-3') SELECT @date2='2000-4-1' if @firstDate>@date2 SELECT @firstDate='1998-08-08' else SELECT @firstDate='1998-01-01' SELECT @firstDate
W WJZLGS Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-05 #8 两者相减大于30天,就是大于一个月! 再有二个回答,就要给分了!