T
tfsmag
i need to create a date range based on the current "shown" month on a
calendar control to query a database and populate a datagrid based on
that date range.
how can i retrieve the "shown" month and year from the calendar control
to create this range. Here is what i was thinking, all i need is the
"shown" month and year to complete.
-----------------------------------------------
Dim themonth as string = (need code to retreive "shown" month)
Dim theyear as string = (need code to retreive "shown" year)
Dim BeginRange as date
Dim EndRange as date
BeginRange = themonth & "/1/" & theyear
Dim daysinmonth As Integer = BeginRange.DaysInMonth(theyear, themonth)
EndRange = themonth & "/" & daysinmonth & "/" & theyear
calendar control to query a database and populate a datagrid based on
that date range.
how can i retrieve the "shown" month and year from the calendar control
to create this range. Here is what i was thinking, all i need is the
"shown" month and year to complete.
-----------------------------------------------
Dim themonth as string = (need code to retreive "shown" month)
Dim theyear as string = (need code to retreive "shown" year)
Dim BeginRange as date
Dim EndRange as date
BeginRange = themonth & "/1/" & theyear
Dim daysinmonth As Integer = BeginRange.DaysInMonth(theyear, themonth)
EndRange = themonth & "/" & daysinmonth & "/" & theyear