There are various instance when we do date calculation on date / unix datetime fields.Following are some example as how to use inbuilt functions of mysql which will reduce doing calculation in PHP, I hope it will help someone:
I enjoy to play with Mysql queries. what i learn from my past experience is,if you are doing a maintainance project or you are handling a project which is developed by some other developer and he mess up with the database definitions, than you “WILL LEARN A LOT NEW THINGS”…………. How?
Whenever i get time i used to answers in PHP related questions in Stackoverflow. Today i come across common question being ask by number of developers, is to get the “Bussiness days” in a specific period. Developer write unneccessary of lines of codes, which we can get easily by using Datetime functions available with PHP.