I have a table in SQL Server 2014 with time stamps.
This is my table:
I want to compare each time stamp from my table with a time stamp that I input and get from my table the time stamp for which the
is the smallest. Hope it is clear what I want. This is for a function and I want to know how can I do that in the easiest way possible?