August 24th, 2011, 01:06 AM
datetimepicker and sql
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
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
Click Here to Expand Forum to Full Width