WEEKDAY Function and WEEKOFYEAR Function in MariaDB Last Updated : 16 Dec, 2020 Comments Improve Suggest changes Like Article Like Report 1. WEEKDAY Function : In MariaDB, The Weekday Function returns the weekday index for a date. In this function, the first parameter will be the Date value. This function returns the weekday index for a date. In WEEKDAY function returns the index value of the weekday given a date value. It works opposite to the DAYNAME function. And index values are as follows. 0=Monday, 1=Tuesday, 2=Wednesday, 3=Thursday, 4=Friday, 5=Saturday, 6=Sunday Syntax : WEEKDAY( date_value ) Parameter : Date Value -Date or datetime value from which to extract the weekday index. Return : It will return the time portion of a DateTime expression. Example-1 : SELECT WEEKDAY('2014-05-20'); Output : 1 Example-2 : The curdate() function return the current system date. Today is Friday so it will return 5. SELECT WEEKDAY(CURDATE()); Output : 5 2. WEEKOFYEAR function : In MariaDB, WEEKOFYEAR function is used to return the week of the year for a date value. In this function, the first parameter will be the date value. This function returns the week of the year (a number from 1 to 53) given a date value. This function assumes that the first day of the week is Monday and the first week has more than 3 days. WEEKOFYEAR function returns the same as the WEEK function with the syntax of WEEK(date_value,3). Syntax : WEEKOFYEAR( date_value ) Parameters : date value -Date or DateTime value from which to extract the week of the year. Return : It returns the week of the year for a date value. Example-1 : SELECT WEEKOFYEAR('2020-01-01'); Output : 1 Comment More infoAdvertise with us Next Article WEEKDAY Function and WEEKOFYEAR Function in MariaDB vipinyadav15799 Follow Improve Article Tags : SQL DBMS-SQL Similar Reads TO_DAYS Function and WEEK Function in MariaDB TO_DAYS Function : In MariaDB, TO_DAYS Function converts a date into numeric days. In this function, the first parameter will be the Date. This function returns the numeric days of the date. This function is to be used only with dates within the Gregorian calendar. This function will return NULL if 2 min read SECOND Function and SYSDATE Function in MariaDB 1. SECOND Function : In MariaDB, The SECOND Function returns the second portion of a date value. In this function, the first parameter will be the date/DateTime. This function returns the seconds (a number from 0 to 59) given a date value. In this function, we will pass the date value in it and it w 2 min read Weekday() and WeekdayName() Function in MS Access In Microsoft Access, date-related functions are essential for managing and analyzing time-based data. Among these, Weekday() and WeekdayName() functions serve specific purposes for handling days of the week.In this article, We will learn about the Weekday() and WeekdayName() Functions in MS Access b 5 min read Sin(), Cos() and Tan() Function in MariaDB 1. Sin() Function : In MariaDB, SIN() function is used to returns the sine of a number. In this function, a number will be passed as a parameter and this function will return the sine of that number. The number used to calculate the sine. It is expressed in radians. Syntax : SIN(number) Parameter : 2 min read DATE_FORMAT() Function in MariaDB DATE_FORMAT() Function : In MariaDB, the DATE_FORMAT() function uses two parameters - a date as specified by a format mask. In this function, the first parameter will be a date and the second parameter will be the mask. This function will return the date in the given mask. This function will convert 3 min read Like