Click here to Skip to main content
15,897,315 members
Home / Discussions / C#
   

C#

 
GeneralRe: ip iterator code challenge Pin
Ian Shlasko29-Nov-11 17:00
Ian Shlasko29-Nov-11 17:00 
GeneralRe: ip iterator code challenge Pin
acecase29-Nov-11 17:02
acecase29-Nov-11 17:02 
GeneralRe: ip iterator code challenge Pin
acecase30-Nov-11 6:59
acecase30-Nov-11 6:59 
GeneralRe: ip iterator code challenge Pin
Ian Shlasko30-Nov-11 7:09
Ian Shlasko30-Nov-11 7:09 
AnswerRe: ip iterator code challenge Pin
BillWoodruff29-Nov-11 12:50
professionalBillWoodruff29-Nov-11 12:50 
GeneralRe: ip iterator code challenge Pin
acecase29-Nov-11 14:25
acecase29-Nov-11 14:25 
GeneralRe: ip iterator code challenge Pin
acecase29-Nov-11 14:29
acecase29-Nov-11 14:29 
QuestionDate.Subtract is calculating incorrectly Pin
indian14329-Nov-11 8:24
indian14329-Nov-11 8:24 
Hi,

I am trying to calculate the duration between two dates in days. But it seems it is calculating always 1 less than the actual duration. I am not understanding is it a bug from MS or something. Following is the code to calculate it.

If you feel its correct one then can you please help me calculating the duration depending on the small date time in instead of calculating the date time on full date time.


string pendDuration = string.Empty;

if (pendActivityDetail.PostponeDate.HasValue)
{
      pendDuration = pendActivityDetail.PostponeDate.Value.Subtract(pendActivity.ActivityDateTime).Days.ToString();
}            
return pendDuration;

Thanks & Regards,

Abdul Aleem Mohammad
St Louis MO - USA

AnswerRe: Date.Subtract is calculating incorrectly Pin
OriginalGriff29-Nov-11 8:44
mveOriginalGriff29-Nov-11 8:44 
GeneralRe: Date.Subtract is calculating incorrectly Pin
Luc Pattyn29-Nov-11 14:35
sitebuilderLuc Pattyn29-Nov-11 14:35 
AnswerRe: Date.Subtract is calculating incorrectly Pin
Ian Shlasko29-Nov-11 10:11
Ian Shlasko29-Nov-11 10:11 
AnswerRe: Date.Subtract is calculating incorrectly Pin
jschell30-Nov-11 10:21
jschell30-Nov-11 10:21 
QuestionC# Execution of Java program Pin
Jerry W. Manweiler, Ph.D.29-Nov-11 7:11
Jerry W. Manweiler, Ph.D.29-Nov-11 7:11 
SuggestionRe: C# Execution of Java program Pin
RaviRanjanKr29-Nov-11 8:30
professionalRaviRanjanKr29-Nov-11 8:30 
AnswerRe: C# Execution of Java program Pin
Not Active29-Nov-11 8:42
mentorNot Active29-Nov-11 8:42 
QuestionRe: C# Execution of Java program Pin
Jerry W. Manweiler, Ph.D.29-Nov-11 9:59
Jerry W. Manweiler, Ph.D.29-Nov-11 9:59 
AnswerRe: C# Execution of Java program Pin
Not Active29-Nov-11 10:05
mentorNot Active29-Nov-11 10:05 
GeneralRe: C# Execution of Java program Pin
Jerry W. Manweiler, Ph.D.29-Nov-11 10:06
Jerry W. Manweiler, Ph.D.29-Nov-11 10:06 
GeneralRe: C# Execution of Java program Pin
Not Active29-Nov-11 10:30
mentorNot Active29-Nov-11 10:30 
GeneralRe: C# Execution of Java program Pin
Jerry W. Manweiler, Ph.D.29-Nov-11 10:32
Jerry W. Manweiler, Ph.D.29-Nov-11 10:32 
AnswerRe: C# Execution of Java program Pin
Alan Balkany2-Dec-11 8:51
Alan Balkany2-Dec-11 8:51 
AnswerRe: C# Execution of Java program Pin
jschell29-Nov-11 10:57
jschell29-Nov-11 10:57 
GeneralRe: C# Execution of Java program Pin
Jerry W. Manweiler, Ph.D.29-Nov-11 11:40
Jerry W. Manweiler, Ph.D.29-Nov-11 11:40 
GeneralRe: C# Execution of Java program Pin
Richard Andrew x6429-Nov-11 14:16
professionalRichard Andrew x6429-Nov-11 14:16 
GeneralRe: C# Execution of Java program Pin
Richard Andrew x6429-Nov-11 14:24
professionalRichard Andrew x6429-Nov-11 14:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.