Wrox Programmer Forums
|
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 11th, 2003, 06:29 PM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB.net Calendar

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.ToShortDateStr ing
txtEnd.Text = MonthCalendar1.SelectionRange.End.ToShortDateStrin g

Please Help
 
Old November 13th, 2003, 10:59 AM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you everyone help,

I have figured it out...
 
Old November 13th, 2003, 11:02 AM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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()





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar like calendar in AJAX in ASP.NET h@ckerz ASP.NET 2.0 Professional 0 February 19th, 2008 12:56 AM
VB 6 Calendar CoolEJ Beginning VB 6 4 October 9th, 2007 02:26 AM
VB.Net Month Calendar ClydeV VB.NET 2002/2003 Basics 7 August 2nd, 2007 08:21 AM
VB.NET Calendar cyndie VB.NET 1 January 21st, 2005 07:05 AM
Vb.net Calendar Control KennethMungwira VS.NET 2002/2003 2 January 17th, 2005 01:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.