Solved

Calender Control

Posted on 2004-04-29
6
298 Views
Last Modified: 2010-04-24
How I Create a my own calendar using calender control and using sql databases
0
Comment
Question by:sdbit6
  • 2
6 Comments
 
LVL 6

Expert Comment

by:zulu_11
ID: 10946891
please clarify what is it exactly that you want?
0
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 63 total points
ID: 10946983
Try use the Date Time Picker Control? I thought the UI is good enough already..
0
 
LVL 1

Assisted Solution

by:Trancedified
Trancedified earned 62 total points
ID: 11054653
There is a control called the DateTimePicker. I assume you are using a date range with the SQL BETWEEN clause.

So make one DateTimePicker your "Start Date" and one your "End Date" Make sure for both of these controls, go to the Value Property and remove the time out of there so there's only a date.

To "use" the datetimepicker w/ a SQL query do something like:

Dim strSQL As String

strSQL = "SELECT * FROM MYTABLE "
strSQL &= "WHERE [My Date Field] BETWEEN " & "'" & DateTimePickerStart.Value & "'" & _
                " AND " & "'" & DateTimePickerEnd.Value & "'"

So the query in plain SQL will look like:

SELECT * FROM MYTABLE WHERE [My Date Field] BETWEEN '4/5/2003' AND '12/31/2004'

That should return all records between those two date ranges.
Notice the "'" & DateTimePickerStart.Value & "'"               is    quote apostrophe quote      like:

"'"
Let me know if that was ok?

Chris
0
 
LVL 1

Expert Comment

by:Trancedified
ID: 11250322
TheLearnedOne,

Hi Bob, splitting points will be nice since the original author said "....and using sql databases." I just think my example could have been more useful or "thorough." I'm fine either way. Thanks for helping me in my other posts :)


Chris
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now