Subject: VB.net Calendar
Posted By: KennethMungwira Post Date: 11/11/2003 5:29:28 PM
Does anyone know how to retrieve all dates from a selectionrange :

I would like to select from 11/1/2003 to 11/7/2003 now I can put the Stop and End dates in text boxes. But I would like to place the dates 11/2, 11/3, 11/4 , 11/5, 11/6 into a Database. This will help me with certain Queries I have to create.


txtStart.Text = MonthCalendar1.SelectionRange.Start.ToShortDateString
txtEnd.Text = MonthCalendar1.SelectionRange.End.ToShortDateString

Please Help
Reply By: KennethMungwira Reply Date: 11/13/2003 9:59:45 AM
Thank you everyone help,

I have figured it out...
Reply By: KennethMungwira Reply Date: 11/13/2003 10:02:45 AM
How do I format a field from Access Database which is placed in a Datafield. The result of my Dataset fill returns a full date, for the 'StartTime' and 'EndTime' when all I want is the time? * Please note that in Access I have the field properties shown correctly..

Dim conStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\DATA\ACCESS\NameDatabase"
            Dim strSQL As String = "SELECT [ItemName], [StartDate],[Requests].[StartTime],[EndDate],[EndTime],[Name] FROM(Requests) "
            strSQL = strSQL & "WHERE (([ItemName]= '" & nItem & "')"
            strSQL = strSQL & "AND (([StartDate])"
            strSQL = strSQL & "BETWEEN #" & kStart & "#"
            strSQL = strSQL & "AND #" & kStop & "#));"
            
            Dim conn As OleDbConnection = New OleDbConnection(conStr)
            conn.Open()
            Dim da As OleDbDataAdapter = New OleDbDataAdapter(strSQL, conn)

            Dim ds As DataSet = New DataSet()
            da.Fill(ds, "Requests")
            Dim dv As DataView = ds.Tables("Requests").DefaultView
            DataGrid1.DataSource = dv
            conn.Close()

Go to topic 6438

Return to index page 1006
Return to index page 1005
Return to index page 1004
Return to index page 1003
Return to index page 1002
Return to index page 1001
Return to index page 1000
Return to index page 999
Return to index page 998
Return to index page 997