How to Fetch Dates from Database between two dates?


#1

here i am getting this error for this query
"select holiday_date from blockchainrmgdb.holiday_calender_master where holiday_date between "+ TodaysDate.ToString + “and” + convertdatetime.ToString


#2

@sup_93

Try this it might work.

select holiday_date from  blockchainrmgdb.holiday_calender_master where 
             holiday_date  between '"+value1+"' and '"+value2"' 

or

select holiday_date from  blockchainrmgdb.holiday_calender_master where 
             and holiday_date >= '"+value1+"' and holiday_date <= '"+value2+"'

Regards,
Mahesh


#3

yea… Its working…
Thank You :slight_smile: