Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DATETIME Question

Status
Not open for further replies.

clydejones

Programmer
Jan 11, 2001
153
US
Hello,

I am writing a stored procedure where I passing a date value to it. This stored procedure MUST find date and time values. There is no problem with the SQL statement finding records with the correct date values. However, when I make a variable for a time value and add it to the SQL statement it has no effect on filtering the query. If I only use the time variable, I don't get any records returned. The field I am querying is of a DATETIME data type. How do I combine the date and time values to get the records that I want? Any help or suggestions will be appreciated.

PS: I have also tried making the time value a TIMESTAMP data type, but was getting error messages about using the convert function.

Thanks,
Clyde
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top