How to set MySQL date from a result set to a PHP datetime object?

i am trying to set the date and time (DateTime stored in mysql database) to a php DateTime object, one way is to override the class some how to make that happen, but is there any easier way than that?e. g. $date = new DateTime();$date->setDate($mysql_resultset[‘date_time’]);and then format that date according and display it.

Object Persistence in Java


At the time of development, sometimes it is necessary to store the state of the object in the file system. Some objects may or may not be stored in the file system depending upon the structural intensity of the object graph. In this article, I will focus on two major aspects of the object persistence. Before going to this subject, I would like to tell you about the significance of the object persistence. Object persistence presupposes the state of the object in the file system. In this matter you can make argument regarding object persistence in the database, which hibernate does. But so far this article is concerned I will give glimpse on persistence in the file system for all convenience. The state of object signifies the attributes or properties of the object in the broader sense. The object graph represents the internal morphological structure of the object. So persisting object means, you are going to store all the internal changed structure of the object.
Continue reading “Object Persistence in Java”