Click here to Skip to main content
15,909,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
           DATE 
 
Jul/16/2013 Tue  02:22:57 PM  
Jul/17/2013 wed  02:22:57 PM
Jul/18/2013 thur  02:22:57 PM
Jul/19/2013 fri  02:22:57 PM

i had a DB field like this,

by using this i need to search item. 
one ddl box contains "Year" another ddl box contains "Month"    and click search button
by using these how i can search the items, what is the condition??? can any one helps me  
Posted
Comments
[no name] 16-Jul-13 6:14am    
help in C# or SQL query?
kesav prakash 16-Jul-13 7:25am    
C#

1 solution

SQL
Dim Strdate As String
        If Not String.IsNullOrEmpty(ddlmonth.SelectedValue) Then
            Strdate = ddlCustomer.SelectedValue
        End If
        If Not String.IsNullOrEmpty(ddlyear.SelectedValue) Then
            Strdate = Strdate & ddlProject.SelectedValue
        End If
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900