I have a vb.net datediff code look below
BlobSmartWorkingContract.MonthDuration = DateDiff(DateInterval.Month, New Date(BlobSmartWorkingContract.ContractStartDate.Value.Year, BlobSmartWorkingContract.ContractStartDate.Value.Month, 1), New Date(BlobSmartWorkingContract.ContractEndDate.Value.Year, BlobSmartWorkingContract.ContractEndDate.Value.Month, 1).AddMonths(1))
i want to do as it is in sql server anybody can help me please