Relational operators

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

Relational operators

Postby Riccardino » Fri Sep 12, 2003 5:54 pm

Hi,

I checked this new option and I think it's great: I built a "start date - end date" filtering system in 3 minutes! :)

Only a little thing: I set up a relation from customer to orders based on the following fields:
CUSTOMERS ORDERS
customerid = customerid
startdate >= orderdate
enddate <= orderdate

Startdate and EndDate are globals.
All works fine except the "<=" operator, that behaves exactly as the "<" operator. For instance, if a customers has an order dated 29-8-2003, if I set up a period from 1-8-2003 to 30-8-2003, the order is displayed in the portal. Everything ok if I also choose from 29-8 to 15-9.
But, if I write from 1-8 to 29-8, the order disappears.
User avatar
Riccardino
 
Posts: 911
Joined: Thu Apr 24, 2003 11:42 am
Location: Ferrara, Italy

Postby Jan Blok » Wed Sep 17, 2003 10:08 am

Is there a time component in the date columns? if so that can influence the behaviour (time is like set to 0:00 in that case)
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby Riccardino » Wed Sep 17, 2003 8:44 pm

Jan Blok wrote:Is there a time component in the date columns? if so that can influence the behaviour (time is like set to 0:00 in that case)

No: the field is formatted as dd/MM/yyyy.
But I noticed a strange thing: if I re-enter tha date manually, the record is correctly displayed in the portal.
But I can't see any difference between a record working and one not working.

I'll try to make some other test...
User avatar
Riccardino
 
Posts: 911
Joined: Thu Apr 24, 2003 11:42 am
Location: Ferrara, Italy

Postby Jan Blok » Wed Sep 17, 2003 9:23 pm

A format is only a display filter, datetime type in firebird is realy date+time, so when you fill the dates via field calender type you also insert a time.
this means if you provide a date to the relation which has as time '0:00' you get the behaviour as described.
If the field is datetime you only can get the wanted behaviour if you set the time element from the date for lower boundary to 0:00.0.000 and the high boundery to 23:59.59.999
(this is waht happens with servoy date search if you use operatos like '<=', '#',etc. in date fields)
If your datebase supports plain 'date' type you migth consider switch the type (if possible), in future release of Servoy we have planned support for 'date' and 'time' only fields if suported by db.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 19 guests