-
August 24th, 2011, 01:06 AM
#1
datetimepicker and sql
.NET 4.0
I have a simple between two datetimepicker query I am trying to implement. Could someone explain to me very simply without a parametrized query debate, how to make a datetimepicker's value appear in my query?
SELECT punches.Number, punches.Punchdate, employees.Name
FROM employees CROSS JOIN
punches
WHERE punches.PunchDate BETWEEN dateTimePicker1.Value AND dateTimePicker2.Value
I realize that this is not the correct formatting.. I have tried quotes, @'s, .ToSmallDateString,DateTime.Parse(), and pretty much everything that I have been able to find on google... yet still I still get errors.. I realize how noob of a question this is...
I also realize I cancel the rules of gravity for not using parametrized input on even the simplest of things.. However, I need baby steps first so I can get a better grasp of how to handle things first... Any input would be appreciated..
Last edited by HackedGadget; August 24th, 2011 at 01:50 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|