Dec 01, 2008, 06:21 PM // 18:21
|
#1
|
Wilds Pathfinder
Join Date: Aug 2006
Location: Nodnol
Guild: Meeting of Lost Minds
Profession: E/Mo
|
Baffled and SQL
Firstly, I'll say this is most likely the completely wrong place and even the completely wrong forum. However, I'm stuck.
If you can point me to a better forum to get this question answered I'd be very grateful. There seem to be a lot of SQL forums on the internet, and all of different varieties: MS SQL, MySQL, SQL server. I don't know what any of these mean so my 'SQL forums' google search was fruitless in terms of an obvious choice.
My question:
Quote:
I'm new to working with databases and I'm trying to create a query that will select only fields that's date matches the current date.
My table (Events) contains two columns, PDate and GName.
PDate contains a Date/Time and GName is text .
Currently my query looks like
Code:
SELECT GName
FROM Events
WHERE PDate = DateTime.Today
I know that DateTime.Today isn't an SQL method, and it doesn't work currently (it just sees it as a parameter) but it works in Vb.net so I've put it there as a placeholder. If I run this in Access I get a message box asking me to fill in a value for the parameter DateTime.Today and when I fill it (with a date that is in my table) it returns the correct GName. The problem is, this needs to be automatic as I'm going to be calling this query through a VB.net application. So, how do I get SQL to read DateTime.Today (or something similar) from the system clock like VB does?
Thankyou very much
Mazey
|
So, can anyone help me out here? Either by answering my question or by pointing me to a forum where I'll get the answers I seek?
Thanks again
Mazey
|
|
|