Click here to Skip to main content
15,887,267 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionPrinting in Visual Studio 2015 Pin
DelboyKent5-Dec-15 5:29
DelboyKent5-Dec-15 5:29 
AnswerRe: Printing in Visual Studio 2015 Pin
Dave Kreskowiak5-Dec-15 6:35
mveDave Kreskowiak5-Dec-15 6:35 
Questionftp/tcp for Windows CE 5.0 Pin
tclacla4-Dec-15 10:27
tclacla4-Dec-15 10:27 
AnswerRe: ftp/tcp for Windows CE 5.0 Pin
Garth J Lancaster4-Dec-15 12:01
professionalGarth J Lancaster4-Dec-15 12:01 
Questionhelp with linq query Pin
byka4-Dec-15 2:56
byka4-Dec-15 2:56 
AnswerRe: help with linq query Pin
Richard Deeming4-Dec-15 4:15
mveRichard Deeming4-Dec-15 4:15 
GeneralRe: help with linq query Pin
byka4-Dec-15 5:07
byka4-Dec-15 5:07 
GeneralRe: help with linq query Pin
Richard Deeming4-Dec-15 5:12
mveRichard Deeming4-Dec-15 5:12 
String representations of integers, or something else?

If it's integers, then Integer.TryParse will work:
VB.NET
Private Shared Function DateFromStringParts(ByVal century As String, ByVal year As String, ByVal month As String, ByVal day As String) As DateTime?
    Dim cy, yr, mt, dy As Integer
    If Not Integer.TryParse(century, cy) Then Return Nothing
    If Not Integer.TryParse(year, yr) Then Return Nothing
    If Not Integer.TryParse(month, mt) Then Return Nothing
    If Not Integer.TryParse(day, dy) Then Return Nothing
    Return New DateTime((100 * cy) + yr, mt, dy)
End Function
...
.Dates = rows.Select(Function(r) DateFromStringParts( _
    r.Field(Of String)("DEIBCY"), _
    r.Field(Of String)("DEIBYR"), _
    r.Field(Of String)("DEIBMT"), _
    r.Field(Of String)("DEIBDY")))




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: help with linq query Pin
Garth J Lancaster4-Dec-15 11:58
professionalGarth J Lancaster4-Dec-15 11:58 
QuestionHiding Buttons based on ListView items (WinForm) Pin
dell-gl62m1-Dec-15 20:08
dell-gl62m1-Dec-15 20:08 
SuggestionRe: Hiding Buttons based on ListView items (WinForm) Pin
Richard MacCutchan1-Dec-15 22:07
mveRichard MacCutchan1-Dec-15 22:07 
QuestionCopy .exe file to desktop Pin
dell-gl62m29-Nov-15 15:24
dell-gl62m29-Nov-15 15:24 
AnswerRe: Copy .exe file to desktop Pin
Mycroft Holmes29-Nov-15 19:24
professionalMycroft Holmes29-Nov-15 19:24 
AnswerRe: Copy .exe file to desktop Pin
Richard MacCutchan29-Nov-15 22:26
mveRichard MacCutchan29-Nov-15 22:26 
AnswerRe: Copy .exe file to desktop Pin
Dave Kreskowiak30-Nov-15 5:12
mveDave Kreskowiak30-Nov-15 5:12 
GeneralRe: Copy .exe file to desktop Pin
Mycroft Holmes30-Nov-15 12:09
professionalMycroft Holmes30-Nov-15 12:09 
GeneralRe: Copy .exe file to desktop Pin
Dave Kreskowiak30-Nov-15 14:43
mveDave Kreskowiak30-Nov-15 14:43 
GeneralRe: Copy .exe file to desktop Pin
dell-gl62m30-Nov-15 16:52
dell-gl62m30-Nov-15 16:52 
GeneralRe: Copy .exe file to desktop Pin
Dave Kreskowiak30-Nov-15 16:54
mveDave Kreskowiak30-Nov-15 16:54 
GeneralRe: Copy .exe file to desktop Pin
dell-gl62m30-Nov-15 17:13
dell-gl62m30-Nov-15 17:13 
GeneralRe: Copy .exe file to desktop Pin
Dave Kreskowiak30-Nov-15 17:58
mveDave Kreskowiak30-Nov-15 17:58 
GeneralRe: Copy .exe file to desktop Pin
dell-gl62m30-Nov-15 18:37
dell-gl62m30-Nov-15 18:37 
GeneralRe: Copy .exe file to desktop Pin
Richard Deeming30-Nov-15 23:17
mveRichard Deeming30-Nov-15 23:17 
GeneralRe: Copy .exe file to desktop Pin
Dave Kreskowiak1-Dec-15 1:33
mveDave Kreskowiak1-Dec-15 1:33 
AnswerRe: Copy .exe file to desktop Pin
Amarnath S1-Dec-15 2:45
professionalAmarnath S1-Dec-15 2:45 

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.