Home Forums SQL Server 2016 SQL Server 2016 - Development and T-SQL Find a date that is closest to a between date check RE: Find a date that is closest to a between date check
Steven.Grzybowski
Hall of Fame
Points: 3214
More actions
August 31, 2016 at 7:04 am
#1898534
If you are looking for closest to the start date or end date, you could just use a query to identify all the records that are between them, and then use either MIN(), or MAX() For the date closest to the start date or the end date respectively.