Added Entry/Enteries for the selected date range
26/12/2005 - 1/1/2006. Checked Successfully Inserting Record/s in the
TT_EntryLog Table. i.e Week Ending Date :
1/1/2006
Problem : Entries Inserted in the Database not getting displayed in Time Entry Page
(TimeEntry.aspx)
Convert(nvarchar, EntryDate, 1) >= Convert(nvarchar, @StartDate, 1)
AND
Convert(nvarchar, EntryDate, 1) <= Convert(nvarchar, @EndDate, 1)
by
AND
EntryDate >= Cast(@StartDate as smalldatetime)
AND
EntryDate <= Cast(@EndDate as smalldatetime)
in
Docs\ListTimeEntries.html
I apologize profusely for the wrong suggestion. I found this solution somewhere on the internet with plenty of explanations but couldn't test it because I didn't have access to my database from where I was when I found information on this problem. I also
tried with
CONVERT(datetime,CONVERT(nvarchar,EntryDate, 1)+' 00:00:00 AM')
BETWEEN @StartDate AND @EndDate
The changes I posted were the correct ones, there were just deployed at the wrong place. They need to be deployed in the dbo.TT_ListTimeEntries stored procedure, using SQL Server Entreprise Manager.
Thanks! That did it! I'm a newbie to ASP.NET so I'll have to figure out why your code works versus the original code.
I noticed that entries for this week worked with the original code so something about the week range for last week (12/26/2005 - 1/1/2006) did not jive. Thanks again!
The original date comparison (that we had to change) didn't have the SQL format needed for the SQL Server to understand that 12/29/2005 is lower than 1/1/2006. That's why it's the only week that wasn't working.
Prashant S A...
Member
15 Points
3 Posts
Entries Not Getting Displayed for Date Range Selection(Week) between 26/12/2005 - 1/1/2006
Dec 28, 2005 12:05 PM|LINK
Added Entry/Enteries for the selected date range 26/12/2005 - 1/1/2006. Checked Successfully Inserting Record/s in the TT_EntryLog Table. i.e Week Ending Date : 1/1/2006
Problem : Entries Inserted in the Database not getting displayed in Time Entry Page (TimeEntry.aspx)
Thanks & Regards,
Prashant A
flemdogg
Member
5 Points
1 Post
Re: Entries Not Getting Displayed for Date Range Selection(Week) between 26/12/2005 - 1/1/2006
Dec 28, 2005 07:35 PM|LINK
I'm having the same issue. Anyone have a fix for this?
Thanks.
algocode
Member
40 Points
8 Posts
Re: Entries Not Getting Displayed for Date Range Selection(Week) between 26/12/2005 - 1/1/2006
Dec 30, 2005 01:15 AM|LINK
algocode
Member
40 Points
8 Posts
Re: Entries Not Getting Displayed for Date Range Selection(Week) between 26/12/2005 - 1/1/2006
Dec 30, 2005 02:38 AM|LINK
Try replacing
Convert(nvarchar, EntryDate, 1) >= Convert(nvarchar, @StartDate, 1)
AND
Convert(nvarchar, EntryDate, 1) <= Convert(nvarchar, @EndDate, 1)
by
AND
EntryDate >= Cast(@StartDate as smalldatetime)
AND
EntryDate <= Cast(@EndDate as smalldatetime)
in
Docs\ListTimeEntries.html
emr0d
Member
10 Points
2 Posts
Re: Entries Not Getting Displayed for Date Range Selection(Week) between 26/12/2005 - 1/1/2006
Dec 30, 2005 03:04 PM|LINK
algocode
Member
40 Points
8 Posts
Re: Entries Not Getting Displayed for Date Range Selection(Week) between 26/12/2005 - 1/1/2006
Jan 03, 2006 04:27 PM|LINK
emr0d,
I apologize profusely for the wrong suggestion. I found this solution somewhere on the internet with plenty of explanations but couldn't test it because I didn't have access to my database from where I was when I found information on this problem. I also tried with
CONVERT(datetime,CONVERT(nvarchar,EntryDate, 1)+' 00:00:00 AM')
BETWEEN @StartDate AND @EndDate
but it didn't work either.
Help!
algocode
Member
40 Points
8 Posts
Re: Entries Not Getting Displayed for Date Range Selection(Week) between 26/12/2005 - 1/1/2006
Jan 03, 2006 07:26 PM|LINK
OOPS! I was right.
The changes I posted were the correct ones, there were just deployed at the wrong place. They need to be deployed in the dbo.TT_ListTimeEntries stored procedure, using SQL Server Entreprise Manager.
emr0d
Member
10 Points
2 Posts
Re: Entries Not Getting Displayed for Date Range Selection(Week) between 26/12/2005 - 1/1/2006
Jan 03, 2006 08:48 PM|LINK
I noticed that entries for this week worked with the original code so something about the week range for last week (12/26/2005 - 1/1/2006) did not jive. Thanks again!
algocode
Member
40 Points
8 Posts
Re: Entries Not Getting Displayed for Date Range Selection(Week) between 26/12/2005 - 1/1/2006
Jan 04, 2006 06:22 PM|LINK