Is it possible to convert regular SQL to spark.sql

Hello community,

Can someone let me know if its possible to convert regular sql to spark.sql?

For example, I would like to convert the following sql query to spark.sql query

SELECT
datepart(day,[Date]) as expr1
from appl_stock

Can someone let me know if its possible to convert the above sql query to spark.sql query?

Thanks

Carlton

Replace this:

datepart(day,[Date]) as expr1

with this:

dayofmonth(date) as expr1