Register  Login
Forums
 
txtDue Date Value
Last Post 05-06-2010 02:16 PM by admin. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
nm
New Member
New Member
Posts:1

--
05-06-2010 02:05 PM  
Hi,

What is the reason for using .AddDays(-1) in the following line of code?

objADefHelpDesk_LastSearch.DueDate = dtDue.AddDays(-1);
admin
Basic Member
Basic Member
Posts:267

--
05-06-2010 02:16 PM  
When you perform a search and you want to see Tasks that are due on or before "1/12/2010", and a task is due "1/12/2010 05:00:00", it wont show up.

The reason is that "1/12/2010" is actually "1/12/2010 00:00:00" and that is less than "1/12/2010 05:00:00".

So we alter your search to be: "1/11/2010 00:00:00" when you actually put in "1/12/2010", and "1/12/2010 05:00:00" now shows up.
You are not authorized to post a reply.


Powered by Active Forums
Terms Of Use | Privacy Statement | Copyright 2009 by Michael Washington Dynnamite DotNetNuke Skins & Modules