table name:student enroll
id name date_of_admission
1 kiran 2008-11-11
how to minus date of admission column in current date in phpmysql?
i want year difference and month difference separately
Jump to Post
I do not know whether this is done professionally but I'll give it a try.
// change date of admission to unix timestamp $adm = strtotime($row['date_of_admission']); // get current time in a form of a timestamp $now = strtotime("now"); // get the difference in seconds $diff = …
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.