Click here to Skip to main content
15,911,141 members

Comments by mekenix (Top 15 by date)

mekenix 14-Dec-20 10:15am View    
Deleted
yeah well i am a dummy, but removing /100 from there did not solve it either? what do you suggesT?
mekenix 14-Dec-20 10:14am View    
well sir you won the lottery :D i am a dummy

mekenix 11-Sep-20 5:03am View    
That worked. Thanks sir
mekenix 10-Sep-20 3:22am View    
Thank you for your help sir. :)
mekenix 10-Sep-20 2:10am View    
No, My date info is in a datetime type column. I thought somehow sql did not think that its a date so tried to convert it just to be safe but that made no difference.

what if i did it like this

cm = new SqlCommand("select * from vwStockIn where sdate between @sdate and @sdate1 and status like 'Bitti'", cn);
cm.Parameters.AddWithValue("@sdate" ,DateTime.Parse(dt1.Value.ToShortDateString()));
cm.Parameters.AddWithValue("@sdate1",DateTime.Parse(dt2.Value.ToShortDateString()));


what would be the problem if i wrote it like this? Outside of unnecessary use of toshortdatestring.


A follow up question, lets think of a hypothetical scenario. I am searching for a record which is in 10:09:2020. I search it by selecting the dates 09:09:2020 and 10:09:2020. But my programme doesnt show my record. Or if i pick 10:09:2020 and 10:09:2020 which it still shows nothing. But it works when i pick 10:09:2020 and 11:09:2020 How can i fix this issue?