SELECT DATEDIFF(now() , created_at)*24 AS hours_passed FROM table_name;
Engineering
MySQL calculate hours since row created
[code lang=”sql”] SELECT DATEDIFF(now() , created_at)*24 AS hours_passed FROM table_name; [/code]
· 5 min read
Related posts
Engineering
My 3 Days Trip to Swat, Malam Jabba and Kalam
Pakistan is a land of natural beauty and has been blessed with the abundance of awe-inspiring outdoor areas. From the unspoiled golden beaches,across the desola
Engineering
Lamudi.pk — Pakistan's Fastest Growing Real Estate Startup
There are several online real estate portals running in Pakistan, a couple of them have captured the market and leading the industry. In such a scenario it’s ha
Engineering
Trigger Google conversion on some event
Normally Google conversion code is added in header or footer of the “Thank you for your purchase” pages. A conversion is logged when someone lands o