Thulasiram pakala

Thulasiram pakala

  • 911
  • 872
  • 115.5k

getdate and sql coulmn sms_date check 20 min

May 19 2021 11:42 AM
 Hi in this type of query i want to check miniute interwell is  20 min more than 20 minites else statement need to display
 
 
if exists ( SELECT *  from insertsmsLog  where  SMS_MobileNumber=@Mobileno  and SMS_OTP=@smsotp and SMS_ApplicationNumber=@Priciapalid        
    and GETDATE() between Convert(datetime,SMS_Date) and Convert(datetime,SMS_Date) )          
   begin
 
END 
ELSE
 
Select 'wrongotp'
 
 
 
Eg :2021-05-25 17:15:2222   system date colukmn date 2021-05-25 16:45:222 i want check minies difference 20 more than 20 otp exp message like tha 

Answers (1)