Has anyone had any issues joining to the "Manufact...
# suiteql
c
Has anyone had any issues joining to the "Manufacturing Operation Task" table for *startdatetime*/*enddate*? I can query JUST the manufacturingoperationtask table and get these dates and they appear to just be dates without any time associated. If I join to this table, it's giving me an invalid search. I've tried the TO_CHAR and TRUNC methods on these fields to make sure its getting a date back but both of them do not work. The other fields I am pulling from the table work just fine but it seems like the dates are just failing.
p
The date fields on manufacturingoperationtask can be tricky because they are stored as datetime under the hood even though they often display as dates only.
A common workaround is to cast the fields explicitly in the query.
c
Yeah i've tried that and did not work. I just got it to work using a subquery surprisingly.
p
For example, using CAST(startdatetime AS DATE) or CAST(startdatetime AS TIMESTAMP) depending on how you want to use it. If that still errors out, the safer route is to pull the raw field without transformations in the join, then format it in your reporting layer outside of SuiteQL.