4
Answers

C# comboBox to label and other help needed

holly

holly

12y
3.9k
1
ok i'm running into some major problems with a calculator i'm making its been 3 years scents I've done any programming and i what i do remember is useless (just some html codeing {which isn't even enough to get a web page work} so ya) needless to say i've been trying to with no success.As far as what i'm using to make the calculator its "c#" and thats the programing codex that i remember most to make programs. heres a link to the album of the program with the concept of what i'm trying to do.http://tempuri.org/tempuri.htmlAny help is greatly appreciatedp.s i remember how to get a label to show a text but i don't remember how code it for it to show.Thanks for all the help,Rsking (co-founder and  Guild Leader for the Fire of the Dragon guild, Saralona sever, Dungeons and Dragons Online)
Answers (4)
1
Ben Chris
35 5.5k 1.1m 8y
your issue here is that you are comparing dates valus exactly with the designated columns and I am assuming that your table date column is of datetime type. This means you need to discard time part from both your target column and your from and to dates i.e.
 
 
  1. select * from tablename where DATEADD(dd,0,DATEDIFF(dd,0,date )) between DATEADD(dd,0,DATEDIFF(dd,0,'01-12-2016')) AND DATEADD(dd,0,DATEDIFF(dd,0,'01-02-2017')) 
Accepted
1
Rajeev Punhani
NA 4.7k 402.7k 8y

Hi Vinay,

 Please find the below link.

https://www.codeproject.com/tips/355235/how-to-search-between-two-dates-and-get-all-record 
1
Amit Gupta
NA 16.5k 25.7k 8y
@Vinay
 
It has always been observed for many times that the problem is occuring with only the date formats
 
Always use the universal format 'yyyy-MM-dd' format instead using 'MM-dd-yyyy'. You can change its format whichever suits the clients.
 
try searching like this
 select * from tablename where date between '2016-12-01' and '2017-02-01'
 
1
Catcher Wong
NA 4.5k 188.6k 8y
Hi , 
 
I can not  understand you question clearly ! Do you mean that?
 
1
Ramesh Palanivel
NA 9.5k 138.6k 8y
HI Vinay,
 
Try your code first in your DB, if it is working fine , check whether the DB and system format both are same or not.
 
try this URL, It may help you
 
http://stackoverflow.com/questions/14353434/selecting-data-between-2-dates 
 
http://stackoverflow.com/questions/16447877/c-sharp-between-two-dates-search
 
http://stackoverflow.com/questions/35272405/how-to-search-between-two-dates-in-c-sharp-with-ms-access
 
http://www.c-sharpcorner.com/forums/search-between-two-dates