# Assertion error and Failure finding function

**URL:** <https://community.dremio.com/t/assertion-error-and-failure-finding-function/6376>\
**Category:** Uncategorized\
**Created:** [October 5, 2020, 8:50am UTC](https://community.dremio.com/t/assertion-error-and-failure-finding-function/6376 "2020-10-05T08:50:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lyashninan](https://avatars.discourse-cdn.com/v4/letter/l/b9e5f3/32.png) [@lyashninan](https://community.dremio.com/u/lyashninan)\
**Post date:** [October 5, 2020, 8:50am UTC](https://community.dremio.com/t/assertion-error-and-failure-finding-function/6376/1 "2020-10-05T08:50:50Z")

</div>

I have the below queries, where am I am getting assertion error:

1. SELECT TRUNC(ABC\_DATE, ‘MI’) FROM TABLE\_1;
2. SELECT CAST(TRUNC(ABC\_DATE, ‘MI’)AS TIMESTAMP) FROM TABLE\_1;

And I am getting Failure finding function: trunc(timestamp) for the below query:  
3. select TRUNC(ABC\_DATE) FROM TABLE\_1;

Can anyone help me around to see if this is a known issue or I am doing some mistake? As the same query is working fine on the oracle DB.

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 6, 2020, 6:19am UTC](https://community.dremio.com/t/assertion-error-and-failure-finding-function/6376/2 "2020-10-06T06:19:16Z")

</div>

@lyashninan

If you logon to the Dremio coordinator , under the log folder, you should see “hive.deprecated.function.warning.log”, can you see if you see trunc in that. Can you please use one of Dremio’s supported functions for date functions

> **[Date/Time · Dremio](https://docs.dremio.com/sql-reference/sql-functions/datetime-functions.html)**
