Elasticsearch SQL query with date and timestamp

Hi,

As per specification I want to get the data as per logic given.

Here is the logic below:
sum(QUANTITY) where FILE_CREATION_DATE = TODAY() and INDEX_NUMBER in (2, 4) and SUBINVENTORY = [x,y,z]

I have transferred this to like this below:
SELECT sum(QUANTITY) FROM "dos-file-*" where INDEX_NUMBER.keyword in (2,4) and SUBINVENTORY.keyword in ('X') and FILE_CREATION_DATE=CURRENT_DATE

If I run this query without this "FILE_CREATION_DATE=CURRENT_DATE", it is running fine. and gives me the SUM..

But If I run this query with this "FILE_CREATION_DATE=CURRENT_DATE" , it is does not giving me and output it is showing as null.

I just want to compare with Today's date with FILE_CREATION_DATE, it is not happening.

Format of this attribute like below:
FILE_CREATION_DATE : Jun 21, 2022 @ 14:53:22.000

How can I achieve this ?

Can anyone help on this please?

@stephenb .. I am little bit stuck here. Can you please help me on that?

Ok. Resolved. I was making logical mistake.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.