Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Filtering on a Date or TimeStamp field?
Thu, May 31 2018 5:51 PMPermanent Link

Ian Branch

Avatar

Hi Team,
What is the correct method for filtering a Date or TimeStamp field in EDBMgr and/or a TEDBTable please?

e.g DateOut > '2018-01-01 00:00:00'

Regards & TIA,
Ian
Thu, May 31 2018 5:56 PMPermanent Link

Raul

Team Elevate Team Elevate

On 5/31/2018 5:51 PM, Ian Branch wrote:
> Hi Team,
> What is the correct method for filtering a Date or TimeStamp field in EDBMgr and/or a TEDBTable please?
>
> e.g DateOut > '2018-01-01 00:00:00'
>

Yes - and this defaults to 24hour format

See
https://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Date_Time_Types

if you're doing date/time then also see intervals

https://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Interval_Types


Raul
Fri, Jun 1 2018 3:13 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian


<<DateOut > '2018-01-01 00:00:00'>>

be very wary of this unless you are absolutely sure of the time portion. If all you're interested in is the date but you have a TIMESTAMP then use CAST eg

CAST(DateOut AS DATE) >= DATE '2018-01-01'


Roy Lambert
Fri, Jun 1 2018 5:20 PMPermanent Link

Ian Branch

Avatar

Hi Roy,
Yup.  Discovered that 'trap'. Frown
All good now.
Ian
Image