Posts by Raphael Duarte • 53 points
2 posts
-
0
votes5
answers29249
viewsA: How to calculate age based on DATE of birth in Mysql based on month and day?
There’s that shape too: DATE_FORMAT(coluna_nascimento, '%d/%m/%Y') AS Nascimento, TRUNCATE(DATEDIFF(NOW(), coluna_nascimento)/365.25, 0) AS Age 365.25 is to compensate for the leap year…
mysqlanswered Raphael Duarte 53 -
5
votes1
answer596
viewsQ: Personalize message by the hour
I wanted to personalize the greeting message depending on the time. Ex: Hora menor que 12h. "Bom dia" Hora menor que 18h. "Boa tarde" I did with if and else but wanted a better method. //Pegando a…