Senzeye

Senzeye

  • NA
  • 226
  • 144.7k

Two Dates Different values retrive

Mar 30 2016 9:19 AM
  1. CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_select_reg`(In date1 varchar(50),In date2 varchar(50))  
  2. BEGIN  
  3.   
  4. select * from `reg` where date > cast(date1 as datetime) and date < cast(vvsysdate as date2) ORDER BY date ASC;  
  5.   
  6. END  
date values  does't  retrived correct   vales from database . 
 
my  date format is dd/MM/yyyy    
 
 how can i solve this problem ?. please help me.

Answers (3)