Say I have a column
Date
23-03-2019
04-04-2019
I want to find hoe many minutes the whole month has in MySQL.
Expected output:
Date MinsinMonth
23-03-2019 44640
04-04-2019 43200
Say I have a column
Date
23-03-2019
04-04-2019
I want to find hoe many minutes the whole month has in MySQL.
Expected output:
Date MinsinMonth
23-03-2019 44640
04-04-2019 43200
Basically, you just want to find the number of days in the month and then do some multiplication. For this, use last_day()
:
select day(last_day(date)) * 24 * 60 as minutes_in_month