Smalldatetime and Reporting and SQL related query

11-09-2004, 02:22 AM

I want to execute following query with MSSqlServer 2000 as database.

SELECT * FROM TABLENAME WHERE CurrentDate = 'Date Selected by user'

Well now my date field in the table is smalldatetime

I am using DTPicker on the VB form to get the date: So i am trying to get the date from it as DTPicker1.value

Second query:
I want to sort records on tha basis of dates i.e "between and" sequence

Third query:
I want to get the datareports based on teh date and time

How to do this?

Help me out

I want to get the report

11-09-2004, 05:06 AM
any body knows how to get report from smalldatetime as filtering element used alongwith DTPicker

How to make a query and pass values for smalldatetime issues

11-09-2004, 05:12 AM
The SQL statement could be

SQL = "SELECT * FROM TABLENAME WHERE (Date >= " & YourStartDate & ") AND (Date <= "& YourEndingDate & " )

You'd use your DatePicker to select the Start Date and the Ending date

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum