on 29/4/01 15:36, Vincent MERCEY at vmercey /at/ noos .DO.T fr wrote:
Hi Vincent,
> I am trying to understand how to work with DateTime fields. > And, I fail.
> Suppose a database that have a Persons table with their birthdate as a > DateTime field.
> How can I search in persons that are N years old ?
> I know how to do that with DAL's DateTime. > I do not see how to deal with Valentina's DateTime. > I have tried Methods provided by Valentina, but they work with strings > ("29/04/2001").
they work NOT only with strings. You can pass to method Date or DateTime field itself.
> I want to do something equivalent to > select * from persons where 2001 - birthdate.year = 40
so you can have Method
mm = "2001 - Year(fldDateTime)"
and then do query:
WHERE mm = 40
Yes, later we will be able use functions directly in SQL and do not create BaseObject method for this.
-- Best regards, Ruslan Zasukhin
------------------------- Paradigma.
e-mail: ruslan@paradigmasoft.com web : http://www.paradigmasoft.com
To subscribe to the Valentina mail list send a letter to valentina-on /at/ lists .DO.T macserve.net
------------------------------------------------------------- The Valentina mailing list is brought to you by MacServe.net For info on lists services, see http://www.macserve.net/lists.html ©2001 Ruslan Zasukhin |