Datepart function in mapd

how to get week from datepart function in mapd
i used datepart(‘week’, column name) but there is no function for week in datepart

i need to get data for 52 weeks how to achieve that

Hi @nagulan,

to get the number of the week in the year, you can use extract function so that the query would look like that

select extract(week from date_or_timstamp_field) from table; 

in datepart function, the week of the year isn’t supported

you can check which intervals are supported in date functions in the date/time section of docs