I'm passing a variable from my function into the date_part function but I keep getting a syntax error. Tried these 2 examples below and still got a syntax error.
Example 1:
_month = date_part('month', timestamp NEW."sdate");
Example 2:
_month = date_part('month', timestamp format('%s',NEW."sdate"));
Can anyone tell me how do I pass my variable into this function?
syntax error at or near "format"