Nirmal G

Nirmal G

  • NA
  • 7
  • 1.9k

Populate only year from datetime data from accessto listview

May 19 2013 2:14 AM
Hi All,
 
I tried many links but I am unable to find a solution. Request your expertise for the below queries:
 
1. I have a listbox where dates from the database are populated. I want only year to be displayed in the listbox. Please advise.
 
2. This is the current select statement : str = "select partyname from casetab WHERE jdate='" +listJDate.SelectedItem.ToString() + "'";
 
How do I convert string to datetime in select statement so I can add in the listbox selectIndexChanged event.
 

Please advise.
 
--
NG

Answers (2)