Maison > Article > base de données > Sql: 請假跨月份問題,或跨年份問題 日期部分边界
,,,,((ss, @sart , @end ) (( @end )) ((( @end ) month ( @sart )) (((((( DATEPART (second, @sart ) as varchar ) ( ) (( day , @sart ) + 1 , @sart ))) (((((( DATEPART (second, @end ) as varchar ) ( ) (, @end )) ,(ms,, GETDATE ()) ()) ()())) ()
,,,,((ss,@sart,@end) ((@end)) (((@end)>month(@sart)) ((((((DATEPART(second,@sart) as varchar) ( ) ((day, @sart)+1,@sart ))) ((((((DATEPART(second,@end) as varchar) ( ) (,@end)) ,(ms,,GETDATE()) ()) ()())) ())())) -- , 49 Days = datediff(dd,0,DateDif), 50 Hours = datepart(hour,DateDif), 51 Minutes = datepart(minute,DateDif), 52 Seconds = datepart(second,DateDif), 53 MS = datepart(ms,DateDif) ( DateDif = EndDate-StartDate, ( StartDate ), ) 64 ) aa 65 ) a ,服务器空间,美国服务器,香港服务器