Using function inside of $X()

0

Does anyone know how to use a function inside of the $X() method?

I need to convert a date when including in my where clause:

 
$X{BETWEEN, CONVERT_TZ(FROM_UNIXTIME(a.date / 1000),'UTC',TimeZone),StartDate,EndDate}
 
Note - TimeZone, StartDate, and EndDate are all parameters. I even setup UTC as a string parameter but still getting an error.
dan_14's picture
3
Joined: Feb 17 2015 - 4:41pm
Last seen: 4 years 5 days ago

1 Answer:

0

You'll just have to manually write the SQL, something like:

WHERE CONVERT_TZ(FROM_UNIXTIME(a.date / 1000),'UTC',TimeZone) BETWEEN $P{StartDate} AND $P{EndDate}
ernestoo's picture
8164
Joined: Nov 29 2010 - 11:59am
Last seen: 1 year 10 months ago
Feedback