SUBTIME() Examples – MySQL

In MySQL, you can use the SUBTIME() function to subtract a time value from a time or datetime expression.

The way it works is, you provide two arguments; the first is a time or datetime value, and the second is a time value. The SUBTIME() function then subtracts the second argument from the first one and returns the result.

Read more

MONTH() Examples – MySQL

You can use the MONTH() function in MySQL to return the month from a date.

In this context, the month is a value between 1 and 12 (or 0 for dates with a zero month part).

For example, if you provide a date of 2018-10-07, the MONTH() function will return 10.

Read more

MAKETIME() Examples – MySQL

When using MySQL, you can use the MAKETIME() function to return a time from the various time parts.

In other words, you provide three arguments; the hour, the minutes, and the seconds. The MAKETIME() function will then return the time value based on those two arguments.

Read more

MAKEDATE() Examples – MySQL

When using MySQL, you can use the MAKEDATE() function to return a date from the year and day-of-year parts.

In other words, you provide two arguments; one being the year, and the other being the day-of-year. The MAKEDATE() function will then return the date value based on those two arguments.

Read more