HOW TO RETRIVE ALL TRANSACTION from sqlserver where TODAYS DATE AS PARAMETER IN SQL QUERY.?
-
hi, i am passing datetime.now.tostring() as parMETER IN MY SQL QUERY for retriving all the transaction of todays.but unable to retrive. please help me. my query like: select billno,net amount from bill_details where date='" +DateTime.Now.Tostring() + "'; THANKS IN ADVANCE.
-
hi, i am passing datetime.now.tostring() as parMETER IN MY SQL QUERY for retriving all the transaction of todays.but unable to retrive. please help me. my query like: select billno,net amount from bill_details where date='" +DateTime.Now.Tostring() + "'; THANKS IN ADVANCE.
Please do not repost: http://www.codeproject.com/Questions/74638/date-time-problem.aspx[^] Post either here or in Q&A, not both.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter. Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
-
hi, i am passing datetime.now.tostring() as parMETER IN MY SQL QUERY for retriving all the transaction of todays.but unable to retrive. please help me. my query like: select billno,net amount from bill_details where date='" +DateTime.Now.Tostring() + "'; THANKS IN ADVANCE.
Well, have you looked at what you are actually passing to the SQL? datetme.now.tostring() gives you the date AND time down to seconds, so unless your database date EXACTLY matches the system date and time nothing will be returned. 2 minutes in debug would have shown you that.
Bob Ashfield Consultants Ltd
-
hi, i am passing datetime.now.tostring() as parMETER IN MY SQL QUERY for retriving all the transaction of todays.but unable to retrive. please help me. my query like: select billno,net amount from bill_details where date='" +DateTime.Now.Tostring() + "'; THANKS IN ADVANCE.
Don't pass it as a string; use a parameter.
-
Don't pass it as a string; use a parameter.
Don't want Little Bobby Tables to make an appearance!
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter. Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
-
Don't want Little Bobby Tables to make an appearance!
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter. Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
If he does I'll kick his skinny white ass.