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
jabeen123
0
Newbie Poster
Recommended Answers
Jump to PostI 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
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.