Re: DataTable.Select question

From: Miha Markic [MVP C#] (miha)
Date: 03/09/05


Date: Wed, 9 Mar 2005 09:14:39 +0100

Hi Mika,

The easisest way would be to add a column to your DataTable, fill it
manually (foreach...) accordingly (extract minutes from SaveTime field) to
your needs.
And then filter on this new column.

-- 
Miha Markic [MVP C#] - RightHand .NET consulting & development 
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info
"Mika M" <mahmik_nospam@removethis_luukku.com> wrote in message 
news:%23fNVX1HJFHA.2704@tk2msftngp13.phx.gbl...
> Hi!
>
> An application adds DataRows into DataTable in random period of time, and 
> after adding new rows saves DataTable as XML-file. DataTable contains 
> DateTime Field named as "SaveTime", and some other fields...
>
> About "SaveTime" field, schema looks like...
>
> <xs:element name="SaveTime" type="xs:dateTime" minOccurs="0" />
>
> Q: Is it possible to retrieve easily only those rows where rows are for 
> example at least 10 minutes old according "SaveTime"?
>
> I mean something like...
>
> Dim drArr As DataRow() = dt.Select("SaveTime >= 10min")
>
> ...so how to make filterExpression correctly if it is possible?
>
> --
> Thanks in advance!
>
> Mika 


Relevant Pages

  • tclodbc, SQL Server, date nighmare
    ... I am trying to get a query to work correctly with tclodbc and SQL ... db "select uuid from extract where savetime < '$date'" ...
    (comp.lang.tcl)
  • Re: tclodbc, SQL Server, date nighmare
    ... db "select uuid from extract where savetime < $date" ... put the single quotes inside the variable $date. ... this is just a wild guess on my part. ...
    (comp.lang.tcl)
  • DataTable.Select question
    ... An application adds DataRows into DataTable in random period of time, ... and after adding new rows saves DataTable as XML-file. ... About "SaveTime" field, schema looks like... ...
    (microsoft.public.dotnet.framework.adonet)

Loading