I am doing a query
that brings me the records that were updated today with equal time, minutes and seconds How can I make a select
so that there is a range of two minutes before and after the date and current time? since I work with a cycle for
and within the cycle I place a ajax
, then if 10 records are sent the time no longer matches and only brings me 5 since they passed milliseconds and it is not the same time, my query
is, knowing that the variable date is DateTime.Now().ToString("yyyy-MM-dd hh:mm:ss")
SELECT * FROM empresa WHERE CAST(F_ENVIO_TEL AS DATETIME2)=CAST('" & fecha & "' AS DATETIME2)