Skip to content
Loading
  • 0
    you change your table name and column name 
     
    below two cases data is came 
    1.  
      declare @fromdate Datetime = '2020-02-10'
      declare @todate Datetime= '2020-02-13'
      select * from ProductManagement where cast(EndDate as date) between @fromdate and @fromdate
      select * from ProductManagement where cast(EndDate as date) between @fromdate and @todate 
       
    0
  • 0

    Another way try 

    select * from save_master where date >= @fromdate AND date <= @todate

    if not work this work 100%

    select * from save_master where (CONVERT(DATE,date ) >= CONVERT(DATE, @StartDate) and CONVERT(DATE, date ) <= CONVERT(DATE, @EndDate))

    0
  • Jignesh Kumar
    0

    Hello,

    You can use >= and <= which will return same day data, you are using between which will not consider fromdate and todate,

    SQL
    select * from save_master where date >= @fromdate AND date <= @todate
    0