How can I give Date and Time parameter to OQL Dataset?

0
Hi team, I want to provide adate time parameter "Next4days " to my query. But there is no parameter type Date and time. It is Date and time range which I can not compare with the date time. Here is my query: Select CcyPair, Buy_Sell, ProductType,count(*), round(cast((sum (case when DeliveryDate > $Next4days + 10 and DeliveryDate < $Next4days + 30 then case when FirstCcy =BaseCcy then FirstCcyAmt else SecondCcyAmt end else 0 end) : sum (case when FirstCcy =BaseCcy then FirstCcy_Amt else SecondCcy_Amt end) ) * 100 as Decimal) , 2) From ImportData.TradeListLine Please let me know if this is possible.
asked
2 answers
1

You migth use the date timetolong function of community commons and use something like this in your query:

'SELECT case.DateCreated as datecreated From module.entityname as case WHERE case.DateCreated > '+ toString($DateCreatedStartLong)'

answered
0
SELECT obj.attr1 AS attribute1 
FROM Module.Object AS obj
WHERE 
obj.dateAttribute >= ' formatDateTime($LowerDateParameter, 'yyyy-M-dd''T''HH:mm:ss.SSSZ') '
AND
obj.dateAttribute <= ' formatDateTime($OuterDateParameter, 'yyyy-M-dd''T''HH:mm:ss.SSSZ') '

Something like this should work for date comparison. Might have to play a little with the '' before and after the formateDateTime but you get the idea.

answered