I have a column in my table that is named 'startDateTime' and 'endDateTime'. I need to select all the rows where current time stamp is in between the startdatetime and enddatetime. Note that the datatype is smalldatetime. How to do this?

Do you talk about sql query or...?
If so, this is it:

string query = @"SELECT * FROM MyTable WHERE StartTime >= @start AND EndTime <= @end";
            //pass the parameters to @start and @end time
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.