Click here to Skip to main content
15,886,008 members
Home / Discussions / C#
   

C#

 
QuestionScreen Capture API Pin
Arjun Menon U.K5-Jun-12 0:51
Arjun Menon U.K5-Jun-12 0:51 
AnswerRe: Screen Capture API Pin
Dave Kreskowiak5-Jun-12 1:37
mveDave Kreskowiak5-Jun-12 1:37 
QuestionInteger to Time Conversion Pin
ochieman20004-Jun-12 13:11
ochieman20004-Jun-12 13:11 
AnswerRe: Integer to Time Conversion Pin
Mycroft Holmes4-Jun-12 14:17
professionalMycroft Holmes4-Jun-12 14:17 
AnswerRe: Integer to Time Conversion Pin
PIEBALDconsult4-Jun-12 15:42
mvePIEBALDconsult4-Jun-12 15:42 
GeneralRe: Integer to Time Conversion Pin
ochieman20004-Jun-12 15:43
ochieman20004-Jun-12 15:43 
GeneralRe: Integer to Time Conversion Pin
PIEBALDconsult4-Jun-12 16:24
mvePIEBALDconsult4-Jun-12 16:24 
AnswerRe: Integer to Time Conversion Pin
VJ Reddy4-Jun-12 16:57
VJ Reddy4-Jun-12 16:57 
I think the following points may be helpful.
Use DateTime.ParseExact to parse the time
C#
DateTime startTime = DateTime.ParseExact("1330","HHmm",
	 System.Globalization.CultureInfo.InstalledUICulture);

similarly parse the end time.

Now find the duration between end time and start time using the Subtract method of DateTime object which returns a TimeSpan object.

Then get the total minutes using the TotalMinutes method of TimeSpan object.

Use the AddMinutes method of DateTime to add minutes to the end time

Then get the string representation of modified end time using
C#
string endTimeString = endTime.ToString("HHmm",
	System.Globalization.CultureInfo.InvariantCulture);


modified 4-Jun-12 23:17pm.

QuestionAdding a Hover event to this Custom Textbox Control? Pin
nickslick4-Jun-12 12:40
nickslick4-Jun-12 12:40 
AnswerRe: Adding a Hover event to this Custom Textbox Control? Pin
BobJanova6-Jun-12 3:07
BobJanova6-Jun-12 3:07 
QuestionUsing Open-Type font in C# Pin
Alan Balkany4-Jun-12 8:36
Alan Balkany4-Jun-12 8:36 
QuestionOOPS Case Study Pin
Kris Erukulla4-Jun-12 5:37
Kris Erukulla4-Jun-12 5:37 
AnswerRe: OOPS Case Study Pin
Luc Pattyn4-Jun-12 5:52
sitebuilderLuc Pattyn4-Jun-12 5:52 
GeneralRe: OOPS Case Study Pin
bsank5-Jun-12 23:41
bsank5-Jun-12 23:41 
GeneralRe: OOPS Case Study Pin
Dave Kreskowiak6-Jun-12 1:51
mveDave Kreskowiak6-Jun-12 1:51 
AnswerRe: OOPS Case Study PinPopular
PIEBALDconsult4-Jun-12 6:06
mvePIEBALDconsult4-Jun-12 6:06 
AnswerRe: OOPS Case Study Pin
Paul Conrad4-Jun-12 6:35
professionalPaul Conrad4-Jun-12 6:35 
AnswerRe: OOPS Case Study PinPopular
Abhinav S4-Jun-12 7:45
Abhinav S4-Jun-12 7:45 
AnswerRe: OOPS Case Study Pin
thatraja4-Jun-12 17:21
professionalthatraja4-Jun-12 17:21 
GeneralRe: OOPS Case Study Pin
Richard MacCutchan4-Jun-12 22:28
mveRichard MacCutchan4-Jun-12 22:28 
GeneralRe: OOPS Case Study Pin
egenis5-Jun-12 21:09
egenis5-Jun-12 21:09 
AnswerRe: OOPS Case Study Pin
Richard MacCutchan4-Jun-12 22:31
mveRichard MacCutchan4-Jun-12 22:31 
QuestionSystem.Net.Sockets IPEndPoint Problem Pin
Midnight Ahri4-Jun-12 0:06
Midnight Ahri4-Jun-12 0:06 
AnswerRe: System.Net.Sockets IPEndPoint Problem Pin
Richard MacCutchan4-Jun-12 1:05
mveRichard MacCutchan4-Jun-12 1:05 
AnswerRe: System.Net.Sockets IPEndPoint Problem Pin
Luc Pattyn4-Jun-12 4:14
sitebuilderLuc Pattyn4-Jun-12 4:14 

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.