Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Calender Control

Posted on 2004-04-29
6
307 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 50

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

840 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