Click here to Skip to main content
15,943,233 members
Home / Discussions / C#
   

C#

 
GeneralRe: Time conversion Pin
Anka_Ame2-May-07 4:21
Anka_Ame2-May-07 4:21 
GeneralRe: Time conversion Pin
Malcolm Smart2-May-07 4:35
Malcolm Smart2-May-07 4:35 
GeneralRe: Time conversion Pin
Anka_Ame2-May-07 5:01
Anka_Ame2-May-07 5:01 
GeneralRe: Time conversion Pin
Malcolm Smart2-May-07 5:02
Malcolm Smart2-May-07 5:02 
GeneralRe: Time conversion Pin
Anka_Ame2-May-07 5:10
Anka_Ame2-May-07 5:10 
GeneralRe: Time conversion Pin
Luc Pattyn2-May-07 5:24
sitebuilderLuc Pattyn2-May-07 5:24 
GeneralRe: Time conversion Pin
Anka_Ame2-May-07 5:36
Anka_Ame2-May-07 5:36 
GeneralRe: Time conversion Pin
Malcolm Smart2-May-07 5:50
Malcolm Smart2-May-07 5:50 
You can't have a time without a date. You keep using TimeSpan. That shows the difference between two times / dates - unless I am mistaken. Anybody?

You have two options - convert all times to 'today' + your time. You can then sort them.

or

Or convert your timestrnig to an integer, throw all the ints into a collection and sort them.

string myString = "07:30"

int myTime = int.Parse( myString.Substring(0,2) ) * 60;
myTime += int.Parse( myString.Substring(3,2) ) ;

This will give you the time in minutes, as aninterger. (from memory, so could be typo's etc);







Regards

Angel
*********************************************


AnswerRe: Time conversion Pin
AFSEKI7-May-07 6:35
AFSEKI7-May-07 6:35 
Generalresult speedy application. Pin
V.2-May-07 2:36
professionalV.2-May-07 2:36 
GeneralRe: result speedy application. Pin
Colin Angus Mackay2-May-07 2:43
Colin Angus Mackay2-May-07 2:43 
GeneralRe: result speedy application. Pin
V.2-May-07 3:09
professionalV.2-May-07 3:09 
AnswerRe: result speedy application. Pin
AFSEKI7-May-07 6:41
AFSEKI7-May-07 6:41 
QuestionNeed solution Pin
DON3452-May-07 2:13
DON3452-May-07 2:13 
AnswerRe: Need solution Pin
Christian Graus2-May-07 2:33
protectorChristian Graus2-May-07 2:33 
GeneralRe: Need solution Pin
DON3452-May-07 2:46
DON3452-May-07 2:46 
GeneralRe: Need solution Pin
Christian Graus2-May-07 10:26
protectorChristian Graus2-May-07 10:26 
AnswerRe: Need solution Pin
Rahul Babu2-May-07 2:54
Rahul Babu2-May-07 2:54 
GeneralRe: Need solution Pin
DON3452-May-07 18:43
DON3452-May-07 18:43 
GeneralRe: Need solution Pin
Rahul Babu2-May-07 19:44
Rahul Babu2-May-07 19:44 
GeneralRe: Need solution Pin
DON3452-May-07 19:57
DON3452-May-07 19:57 
QuestionSocket exception. Pin
Eytukan2-May-07 2:13
Eytukan2-May-07 2:13 
AnswerRe: Socket exception. Pin
Rahul Babu2-May-07 2:31
Rahul Babu2-May-07 2:31 
GeneralRe: Socket exception. Pin
Eytukan2-May-07 3:44
Eytukan2-May-07 3:44 
GeneralRe: Socket exception. Pin
MoustafaS2-May-07 4:35
MoustafaS2-May-07 4:35 

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.