Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ravininave
Posting Yak Master
111 Posts |
Posted - 2010-04-08 : 02:44:12
|
| in my query is use Where cDate >= @Date1 and cDate <= @Date2It works fine locally but when online it doesn't shows any data maybe there is some problem with date format how should I format the DateVB6/ASP.NET------------------------http://www.nehasoftec.com |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-04-08 : 02:47:14
|
| Check the datatype of @Date1,@Date2.Make sure the column cDate also datatime datatype!Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
ravininave
Posting Yak Master
111 Posts |
Posted - 2010-04-08 : 03:41:24
|
| My ProcedureCREATE PROCEDURE [dbo].[FetchComm](@FDate_1 [datetime],@TDate_2 [datetime])ASBEGIN Select MonComm.*,ePartners.PartName, ePartners.BankName, ePartners.BankAc, ePartners.BankBranch, ePartners.IFSCCode, ClientDets.ClientName as [Client] from MonComm Inner Join ePartners on MonComm.PartCode = ePartners.PartCode Inner Join ClientDets on MonComm.KarvyCode=ClientDets.KarvyCode Where MonComm.Date1 >= @FDate_1 AND MonComm.Date2 <= @TDate_2END |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-04-08 : 05:06:22
|
| How do you input to stored procedure?MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-08 : 05:19:31
|
| try to use standard format CCYYMMDD for date values------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
ravininave
Posting Yak Master
111 Posts |
Posted - 2010-04-09 : 02:27:33
|
quote: Originally posted by visakh16 try to use standard format CCYYMMDD for date values------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Can u explain with Example. How could I use format CCYYMMDD in query. Is it like cDate > = format(@Date1,"CCYYMMDd")VB6/ASP.NET------------------------http://www.nehasoftec.com |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-04-09 : 03:02:05
|
| When you give inputs to date variable, use YYYYMMDD formatexampleMarch 10, 2010 can be expressed as 20100310MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|