Click here to Skip to main content
15,920,111 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questioncan someone please help me to convert a string to time?... tnx!!! Pin
cutequencher19-Jun-07 14:52
cutequencher19-Jun-07 14:52 
AnswerRe: can someone please help me to convert a string to time?... tnx!!! Pin
Christian Graus19-Jun-07 15:24
protectorChristian Graus19-Jun-07 15:24 
AnswerRe: can someone please help me to convert a string to time?... tnx!!! Pin
TwoFaced19-Jun-07 16:11
TwoFaced19-Jun-07 16:11 
GeneralRe: can someone please help me to convert a string to time?... tnx!!! Pin
cutequencher19-Jun-07 16:54
cutequencher19-Jun-07 16:54 
GeneralRe: can someone please help me to convert a string to time?... tnx!!! Pin
TwoFaced19-Jun-07 19:03
TwoFaced19-Jun-07 19:03 
GeneralRe: can someone please help me to convert a string to time?... tnx!!! Pin
cutequencher19-Jun-07 21:11
cutequencher19-Jun-07 21:11 
GeneralRe: can someone please help me to convert a string to time?... tnx!!! Pin
cutequencher19-Jun-07 21:22
cutequencher19-Jun-07 21:22 
GeneralRe: can someone please help me to convert a string to time?... tnx!!! Pin
TwoFaced20-Jun-07 4:52
TwoFaced20-Jun-07 4:52 
Try replacing dtgCustomSched.Item(row,2) with a literal string that represents a time. Something like "12:29:01". That should certainly work. Once you've verified that try using a string variable to hold the date instead of using dtgCustomSched.Item(row,2) directly. So simply assign that value to a string and then in the ParseExact line use the string variable instead. Worth a shot I guess. If that doesn't work then go back and double and triple check the string your getting from the DB. Are you sure there aren't any other characters in it that you don't want. A space? Some sort of linefeed character or something silly like that? Basically if the string isn't 8 characters long then something isn't right. In fact try using the string.length function to verify it's length.

If you still can't get it I'd try another method. Do as christian said and use the string.split function to parse the numbers out of the string. Once you've got the individual hours, minutes, and seconds you should be able to pass those to the constructor of the date class to create your date object.
QuestionVB 2005 and Excel Pin
Karma3125119-Jun-07 5:45
Karma3125119-Jun-07 5:45 
AnswerRe: VB 2005 and Excel Pin
MidwestLimey19-Jun-07 6:39
professionalMidwestLimey19-Jun-07 6:39 
GeneralRe: VB 2005 and Excel Pin
koolprasad200319-Jun-07 23:32
professionalkoolprasad200319-Jun-07 23:32 
Questionhow do i send a mail from vb.net? Pin
sathyan_829419-Jun-07 4:50
sathyan_829419-Jun-07 4:50 
AnswerRe: how do i send a mail from vb.net? Pin
Steven J Jowett19-Jun-07 5:08
Steven J Jowett19-Jun-07 5:08 
QuestionTreeview re-order childnodes of same parent VB.net. Pin
.NetRams19-Jun-07 3:19
.NetRams19-Jun-07 3:19 
AnswerRe: Treeview re-order childnodes of same parent VB.net. Pin
Dave Kreskowiak21-Jun-07 3:50
mveDave Kreskowiak21-Jun-07 3:50 
Questionuserdeletingrows event Pin
kermit88819-Jun-07 3:05
kermit88819-Jun-07 3:05 
QuestionProblem with designer in vs.net 2005 pro Pin
Mekong River19-Jun-07 0:06
Mekong River19-Jun-07 0:06 
AnswerRe: Problem with designer in vs.net 2005 pro Pin
Tom Wright19-Jun-07 7:07
Tom Wright19-Jun-07 7:07 
AnswerRe: Problem with designer in vs.net 2005 pro Pin
GoodID19-Jun-07 19:33
GoodID19-Jun-07 19:33 
GeneralRe: Problem with designer in vs.net 2005 pro Pin
Mekong River20-Jun-07 0:28
Mekong River20-Jun-07 0:28 
GeneralRe: Problem with designer in vs.net 2005 pro Pin
GoodID21-Jun-07 17:30
GoodID21-Jun-07 17:30 
GeneralRe: Problem with designer in vs.net 2005 pro Pin
Mekong River21-Jun-07 18:38
Mekong River21-Jun-07 18:38 
QuestionCan crystal report v11 integrate with vs 2005 standard? Pin
Mekong River18-Jun-07 23:58
Mekong River18-Jun-07 23:58 
Questionhow to read data from text file, extract and display in excel format? Pin
mrr218-Jun-07 22:51
mrr218-Jun-07 22:51 
AnswerRe: how to read data from text file, extract and display in excel format? Pin
Christian Graus19-Jun-07 0:23
protectorChristian Graus19-Jun-07 0:23 

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.