Well, it seems pretty simple to me...

1. Store the lower and upper limits of your range (the range you plan
to filter on) into two separate DateTime instances.
2. Retrieve the appropriately formatted string using the ample methods
of the DateTime structure. (e.g., ToShortDateString()) and optionally
store them into 2 more variables.
3. Construct your SQL filter expression using syntax similar to the
following : [Typed in here, watch for typos]

DataRow[] mySel = myDataTable.Select(string.Format("DateCol >= '{0}'
AND DateCol <= '{1}' ", startDate, endDate));

On Oct 1, 8:30 am, "vanitha palanisamy" <[EMAIL PROTECTED]> wrote:
> hi,
> am not asking in sql server.Am asking thro coding.From datatable how to
> filter.
>
> On 9/30/08, vanitha palanisamy <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi
> > Am Vanitha,
>
> > Can anyone say,
> > Is this possible to filter only date from datetime in datatable.
>
> > or can say how to set the format of date in datatable.
>
> > Thanks in advance.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
 <p><a href="http://feeds.feedburner.com/DotNetDevelopment";><img 
src="http://feeds.feedburner.com/~fc/DotNetDevelopment?bg=99CCFF&amp;fg=444444&amp;anim=1";
 height="26" width="88" style="border:0" alt="" /></a></p>
-~----------~----~----~----~------~----~------~--~---

Reply via email to