How to Fetch Dates from Database between two dates?

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

@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

2 Likes

yea… Its working…
Thank You :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.