Filtering Timestamp with zeos and fb URGENT
Moderators: gto, cipto_kh, EgonHugeist
Filtering Timestamp with zeos and fb URGENT
I have a problme with filtering with filtered property on dataset
i do (movdate>='01-01-2010')and(movdate<='31-01-2010')
and it doesn t work
I can i solve this ?????
Thanks
i do (movdate>='01-01-2010')and(movdate<='31-01-2010')
and it doesn t work
I can i solve this ?????
Thanks
where's the code ..
That sounds as a date cast problem. Supposing you are using Dialect 3 try this code instead:
If that does not work try replacing the comparison with:
All of this is supposing your database date format is effectively dd-mm-yyyy. If not you should change the date literals as needed.
HTH
Code: Select all
(movdate>=CAST('01-01-2010' AS TIMESTAMP))
and
(movdate<=CAST('31-01-2010' AS TIMESTAMP))
Code: Select all
movdate<=(SELECT CAST('31-01-2010' AS TIMESTAMP)) FROM RDB$DATABASE)
HTH
Sorry for the misundestand and thanks any way it helped me on sql staments.
but the prob is when i use local filtering like
ztable.filter := ' (movdate>='01-01-2010')and(movdate<='31-01-2010') ';
ztable.filtered := true;
It filter but blank , parsing error maybe ...
I use a lot local filter is faster ... doesnt overload network with several queries.
Can someone help on this.
Thanks
but the prob is when i use local filtering like
ztable.filter := ' (movdate>='01-01-2010')and(movdate<='31-01-2010') ';
ztable.filtered := true;
It filter but blank , parsing error maybe ...
I use a lot local filter is faster ... doesnt overload network with several queries.
Can someone help on this.
Thanks
where's the code ..
-
- Senior Boarder
- Posts: 93
- Joined: 01.07.2009, 16:07
Are you sure the date format is correct?
On the other hand, I am unsure whether if the selected database affects the filter in Zeos somehow, but you could try to use:
HTH
On the other hand, I am unsure whether if the selected database affects the filter in Zeos somehow, but you could try to use:
Code: Select all
filter := ' (movdate>='+QuotedStr('01-01-2010')+' AS TIMESTAMP)and(movdate<='+QuotedStr('31-01-2010')+' AS TIMESTAMP) ';
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
It should not.I am unsure whether if the selected database affects the filter in Zeos somehow
Zeos filtering is done completely clientside.
Unfortunately I'm not familiar with the exact date handling in the filter code.
Debugging TZExpression.Evaluate might help a lot.
Also, have a look at the attached documentation made by fst001.
Mark
You do not have the required permissions to view the files attached to this post.
Ok , No bug,we can only use Boolean and Integer with "and" operator. so we can do a basic filter like = <> > < but not or "and" "or" "xor" ... etc.
So is correct and documented then no problems with it.
Whould be better we can filter double,Floats with it but its ok. zExpression Is good enough.
Thank guys.
So is correct and documented then no problems with it.
Whould be better we can filter double,Floats with it but its ok. zExpression Is good enough.
Thank guys.
where's the code ..
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
sfxcc,
I think you misunderstand the functionality a little. Doesn't the ZExpression drill deeper?
So I think (movdate>='01-01-2010')and(movdate<='31-01-2010')
is spilt up in
(movdate>='01-01-2010')
and
(movdate<='31-01-2010')
Which are two boolean expressions that can be compared with 'and'.
Or am I SOOO wrong??
If I'm not, please start using one of these simple expresions (eg movdate>='01-01-2010') and then find out why it (doesn't) work.
I still thing date comparisons should work...
Mark
I think you misunderstand the functionality a little. Doesn't the ZExpression drill deeper?
So I think (movdate>='01-01-2010')and(movdate<='31-01-2010')
is spilt up in
(movdate>='01-01-2010')
and
(movdate<='31-01-2010')
Which are two boolean expressions that can be compared with 'and'.
Or am I SOOO wrong??
If I'm not, please start using one of these simple expresions (eg movdate>='01-01-2010') and then find out why it (doesn't) work.
I still thing date comparisons should work...
Mark
Ok, forgot the result is boolean.. thinking on other stuff of the project.
But i tried several ways and it didnt work.. and with zquery at first worked so .. supposed the before post. .. .
Ill try it later cause i have to finish a project for lastweek... so with zquery is workin .. it stays by now with it.
Thanks mdaems.
But i tried several ways and it didnt work.. and with zquery at first worked so .. supposed the before post. .. .
Ill try it later cause i have to finish a project for lastweek... so with zquery is workin .. it stays by now with it.
Thanks mdaems.
where's the code ..