![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 7 of 7 total |
![]() |
Wed, Sep 25 2019 8:00 PM | Permanent Link |
Ian Branch | Hi Team,
I am trying to apply a simple filter to an EDBQuery. {code} JobTickets.Open; JobTickets.Filter := 'DateIn = '+QuotedStr('24/10/2017'); JobTickets.Filtered := True; {code} I have tried all sorts of permutations but I keep getting an error that in essence says.. "..(Expected Date or TimeStamp expression but instead found '24/10/2017')" My regional shortdate setting is dd/mm/yyyy, and the DateIn field is a EDB Date field. What am I doing wrong please? Regards & TIA, Ian |
Wed, Sep 25 2019 8:45 PM | Permanent Link |
Fernando Dias ![]() | Ian,
It should be: JobTickets.Filter := 'DateIn = DATE ' + QuotedStr('2017-10-24'); And the regional settings don't matter, its always DATE 'yyyy-mm-dd' -- Fernando Dias [Team Elevate] |
Wed, Sep 25 2019 9:40 PM | Permanent Link |
Ian Branch | Hi Fernando,
Oh! I thought that was a SQL thing. There you go. Thank you. Regards, Ian |
Thu, Sep 26 2019 1:58 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Ian
Apart from the fact that JOINs aren't permitted ElevateDB table filter and EDBQuery SQL WHERE clause are pretty much identical Roy Lambert |
Thu, Sep 26 2019 2:35 AM | Permanent Link |
Ian Branch | HI Roy,
Thanks for the clarification. So, if I want to now filter a DateTime field I would do something like this.. {code} LastModified >= TimeStamp '2019-04-25 07:47:35' {code} I have discovered that in order to do this.. {code} LastModified = TimeStamp '2019-04-25 07:47:35' {code} I actually needed the decimal part of the seconds as well as in '2019-04-25 07:47:35.349'. I understand why this might be but is there a way to filter the record(s) for '2019-04-25 07:47:35'? Or even '2019-04-25 07:47'? I don't really expect the User to be cared enough to worry about the seconds. ![]() Regards, Ian |
Thu, Sep 26 2019 2:39 AM | Permanent Link |
Ian Branch | Or even just the Date component.
LastModified = Date '2019-04-25 07:47:35.349' doesn't work. |
Thu, Sep 26 2019 2:44 AM | Permanent Link |
Ian Branch | I hate it when it comes to you right after you asked the
question......... All sorted now. |
This web page was last updated on Thursday, July 10, 2025 at 10:36 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |