Hi
I am using VB6 and MS SQL Express DB. I have an app that uses a date picker for the operator to select a date, then I want to use an SQL statement to retrieve a record from the database that matches that date. The date in the DB is stored in Date/Time format, but I am only interested in the date portion.
At the moment I am using this.
sql_str = "SELECT Produced, Running_Time, Stopped_Time, Start_date From Shifts WHERE Start_Date = (" & dtpk_start_date.Value & ")"
but as the time is stored in the same field it doesn't work.
Can anybody suggest a possible solution.
many Thanks
Regards
Alan Edwards
85% of statistics that are quoted are entirely made up!
I am using VB6 and MS SQL Express DB. I have an app that uses a date picker for the operator to select a date, then I want to use an SQL statement to retrieve a record from the database that matches that date. The date in the DB is stored in Date/Time format, but I am only interested in the date portion.
At the moment I am using this.
sql_str = "SELECT Produced, Running_Time, Stopped_Time, Start_date From Shifts WHERE Start_Date = (" & dtpk_start_date.Value & ")"
but as the time is stored in the same field it doesn't work.
Can anybody suggest a possible solution.
many Thanks
Regards
Alan Edwards
85% of statistics that are quoted are entirely made up!