4
Answers

How to convert day, month and year into month and year

Lucas Ngobeni

Lucas Ngobeni

8y
396
1
Hi Everyone

I have table called MCALLERS on my database that has column which called CallDate, datatype is datetime stored data as 2016-02-01 17:01:00.000

on my web Form I have dropdownlist which is populating month and year as March-2016.

how to convert datetime into month and year when I search data.I want to search data from database using Month and year as (March-2016). I'm sing C#.

Thanks in advance
 
what I have tried
 
 
 
select BusinessCallYN,CallID,NewNam,CallDate,CalledNo,CallExt,CallDuration,Amount,tmpNewNam from MCALLERS where UserName='"+txtEmail+"' and CallDate>='"+cmddropdownlist1+"' and CallDate<'"+cmddropdownlist1+"' and Amount>0 order by CallDate
Answers (4)