The question is how to get the difference from following date format in a second?
For example, if date1 = 4/21/2021 7:53:50 and date2 = 6/21/2021 7:54:10, the answer should 20 .
I am trying below code but it is providing wrong result that is: -40
@Christian_Dahlqvist ,
PFB sample document. I parse out last fields i.e received at and sent at through grok and converted into date in logstash.
[0915adf2-ff62-421e-97a8-0a00cbb7df7f] [07:53:41 Information] SpotQuote Request : {"RequestId":"5679uo678","LineItems":[{"QuoteRequestId":"87635204","BuyCurrency":"CAD","SellCurrency":"XOF","DealCurrency":"XOF","SalesCohort":"WUBSCTEST","TreasuryCohort":"WUBSCTESTCORE","ValueDate":"SPOT","Amount":500.0,"Direction":"Sell","MarketConvention":"CAD/XOF"}]} received at 4/21/2021 7:56:15 AM
`[0915adf2-ff62-421e-97a8-0a00cbb7df7f] [07:53:43 Information] SpotQuote Response : {"ResponseId":"5679uo678","LineItems":[{"QuoteResponseId":"87635204","QuoteId":"G-9a221d-178f4476610-WUSales-2f23fc6-WUBSCTEST-WUSales-1619006023185","SpotRate":437.3374,"CostRate":437.3374,"ForwardPoints":0,"ValidUntilTime":"00:02:00.000","SpotMargin":4.3655,"ForwardPointMargin":0,"Margin":0,"ClientRate":443.8857,"ForwardMargin":0,"IsQuoteTradable":true}]} sent at 6/21/2021 7:57:20 AM`
[0915adf2-ff62-421e-97a8-0a00cbb7df7f] [07:53:43 Information] SpotQuote Response : {"ResponseId":"5679uo678","LineItems":[{"QuoteResponseId":"87635204","QuoteId":"G-9a221d-178f4476610-WUSales-2f23fc6-WUBSCTEST-WUSales-1619006023185","SpotRate":437.3374,"CostRate":437.3374,"ForwardPoints":0,"ValidUntilTime":"00:02:00.000","SpotMargin":4.3655,"ForwardPointMargin":0,"Margin":0,"ClientRate":443.8857,"ForwardMargin":0,"IsQuoteTradable":true}]} sent at 6/21/2021 7:57:20 AM received at received at 4/21/2021 7:56:15 AM
Please provide the document exactly as indexed in Elasticsearch with the mappings for that index. Can not help or ntry to recreate the issue without that.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.