LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  filter on a datetime field

    Employee
    Posted 05-31-2014 14:40

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: SambaDancer

    Dear all,

    Using Lavastorm 5

    I'm using the BRD Viewer's option "Copy as examine filter" to place a filter on a field of type datetime.
    Pasting this filter results in the following code: 'API_INVOICE_DATE' == 2011-02-22 00:00:00
    Executing this filter node, however, results in an error: Unexpected token ( 00
    The only code that does seem to work is:
    'API_INVOICE_DATE'.date() == "2011-02-22 00:00:00".date("CCYY-MM-DD")

    Why does the first method result in an error?
    Why does the Copy as examine filter result in incorrect Brainscript?
    Is there an easier way to get to the same result?

    Thanks!
    Bart Roeleveld (Coney, The Netherlands).


  • 2.  RE: filter on a datetime field

    Employee
    Posted 06-02-2014 08:22

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ejones

    The code "2011-02-22 00:00:00" is not valid BRAINscript. I think it is interpreting the date part as start with 2011 subtract 2 and then subtract 22 and then when it tries to understand 00:00:00 it gives up and throws an error.

    The datetime type is newer than other types and I understand it is still a work in progress. I'm glad you are providing visibility to something that needs improvement.


  • 3.  RE: filter on a datetime field

    Employee
    Posted 06-02-2014 09:00

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: SambaDancer

    Ahh, thanks for explaining!
    Good to know you wonderful people @Lavastorm are working on it!
    Thanks again and warm greetings from Th Netherlands!
    Bart.