Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Calender Control

Posted on 2004-04-29
6
Medium Priority
?
312 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
[X]
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
  • 2
6 Comments
 
LVL 6

Expert Comment

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

Accepted Solution

by:
Ryan Chong earned 252 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 248 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

661 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