Hello everyone,
Pretty new to In-db tools and SQL. I am trying to simply convert a date into Year, Month, Week and day.
I tried doing the following.
SELECT
YEAR(GETDATE("order_createdat"))
SELECT
MONTH(GETDATE("order_createdat"))
SELECT
DATEPART(WEEK,GETDATE("order_createdat"))
SELECT
DAY(GETDATE("order_createdat"))
Again, really new to this, so any help would greatly be appreciated! Thanks!
Solved! Go to Solution.
Hi @tclopes
SQL functions are different for each database.
For example, the below function will be work well in MS SQL.
YEAR("order_createdat")
MONTH("order_createdat")
DAY("order_createdat")
I recommend to see the reference of SQL function in your DB.