0

I have the following code for part of an application I'm building and I need some instruction on how to store this value and carry it to the next part of the program.

Private Sub dateEntryTextbox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dateEntryTextbox.TextChanged
        Dim dateEntryTextBox As Date
        Try
            FormatDateTime(DateString, DateFormat.GeneralDate)
            MsgBox("Valid Date")
        Catch ex As Exception
            MsgBox("Invalid Date")
        End Try
    End Sub

the dateEntryTextbox will be a date entered that I want to store as a date and use it to fire a sql query in another button on my app. Any assistance would be appreciated.

Thanks

Doug

Edited by dougancil: n/a

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by dougancil
0

Actually I'm working on a windows application and have decided to go with a datetimepicker instead of a text box but I guess the same question still applies. Also because the datetimepicker variable has to be stored as a date, there will have to be some conversion as well (because I'm applying the date to a sql query that has already been written.) The datetime conversion (as it's currently written) is as follows:

Format$((([Timestamp]-(([LoggedIn]/1000)/60))/1440)+1,"yy/mm/dd")
HAVING (((Format$((([Timestamp]-(([LoggedIn]/1000)/60))/1440)+1,"yy/mm/dd"))
Between [Start (YY/MM/DD)] And [End (YY/MM/DD)]));
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.