Hello everyone
I am writing a program for someone else to use and it use's a SQL database.
It has 3 query's (2 I have already done)
the database has 12 columns and 3 of them are columns with dates in them...eg [date1] [date2] [date3], also in all 3 columns there will be some blank or NULL fields.
dates will be added over time as the person uses the program.
the info in the 12 columns are show in 12 textboxs (Detail view)
when I click on a button on a menu bar .. I need it to check the systems date against the dates in the 3 date columns and return (all columns)any that are =< 30 days
SELECT * (all columns)
FROM [mydatabase]
WHERE (this is where I am lost), I know I need to use DATEDIFF, but trying to use MSDN help is like pulling teeth...LOL
I hope someone can help me
Thanks
Mick
I am writing a program for someone else to use and it use's a SQL database.
It has 3 query's (2 I have already done)
the database has 12 columns and 3 of them are columns with dates in them...eg [date1] [date2] [date3], also in all 3 columns there will be some blank or NULL fields.
dates will be added over time as the person uses the program.
the info in the 12 columns are show in 12 textboxs (Detail view)
when I click on a button on a menu bar .. I need it to check the systems date against the dates in the 3 date columns and return (all columns)any that are =< 30 days
SELECT * (all columns)
FROM [mydatabase]
WHERE (this is where I am lost), I know I need to use DATEDIFF, but trying to use MSDN help is like pulling teeth...LOL
I hope someone can help me
Thanks
Mick