Related Articles
MINUTE () and MONTH () in MariaDB
• Last Updated : 16 Nov, 2020

1. MINUTE () Function :

In MariaDB, Minute Function has used to return the minute portion of a date value. In this function, the first parameter will be the date. MINUTE Function will return the minute in which range will be from 0 to 59 and given a date value. We will pass a date/DateTime and it will return the minute part of that.

Syntax :

```MINUTE( date_value )
```
`Minute range = [ 0 to 59 ]`

Parameter :

Return :

The minute portion of a date value.

Example-1 :

```SELECT MINUTE('2019-05-19 09:21:18.000004');
```

Output :

```19
```

Example-2 :

```SELECT MINUTE('838:59:01');
```

Output :

```59
```

Example-3 :

The curtime() function returns the current time. The current time is 07:27:24 rightnow.

```SELECT MINUTE(CURTIME());
```

Output :

```27
```

2. MONTH () Function :

In MariaDB, The Month Function is used to return the month portion of a date value. In this function, the first parameter will be date_value. In a date format it is one of the part of date and It will return the month values from 1 to 12 or Jan to Dec, etc. depends on different formats of date. This function returns the month (a number from 1 to 12) given a date value.

Syntax :

``` MONTH( date_value )
```
`Month range (In number) = [1 to 12]`

Parameters :

Return :

The month portion from date.

Example-1 :

```SELECT MONTH('2017-06-19 09:04:10');
```

Output :

```6
```

Example-2 :

```SELECT MINUTE('838:59:01');

```

Output :

```59
```

Example-3 :

The curtime() function returns the current time of the system. Today is 07-11-2020

```SELECT MINUTE(CURTIME());
```

Output :

```11
```

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up