A91627
asked on
Datatable select method to select date
I have a datatable that contain column of data type datetime.
for example:
i have a column name 'Ndate' that have datavalue '03-29-2006 12:00:00AM'
i want to select rows that 'Ndate' is '03/29/2006'.
Could anyone pls tell me how can i select it using datatable.select method..?
for example:
i have a column name 'Ndate' that have datavalue '03-29-2006 12:00:00AM'
i want to select rows that 'Ndate' is '03/29/2006'.
Could anyone pls tell me how can i select it using datatable.select method..?
ASKER
Sorry. Allow me to make me clear...
Actually i want to select date only from date time column.
For example:
column [Date]
'03/29/2006 12:00:00A.M'
and i want to select it date only like
'03/29/2006'
is there any way like convert datetime to date only or select date only in datatable.select method..?
I have tried datatable.select("Convert( date, Varchar)"), but the result is a error message like this :
'Invalid datatype Varchar'
Actually i want to select date only from date time column.
For example:
column [Date]
'03/29/2006 12:00:00A.M'
and i want to select it date only like
'03/29/2006'
is there any way like convert datetime to date only or select date only in datatable.select method..?
I have tried datatable.select("Convert(
'Invalid datatype Varchar'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://msdn2.microsoft.com/en-us/library/system.data.datatable.select.aspx