hi, i need to subtract one date form the other and take the difference in minutes or seconds..
i'm getting the first date from the data base in 'Y-m-d H:i:s' format and second date is the current date (same format). and i want to know the difference between them in minutes and seconds.
thanx!.
Virangya 0 Junior Poster
Recommended Answers
Jump to Postsample :
print("<?php $to_time=strtotime("2011-01-13 10:42:00"); $from_time=strtotime("2011-01-12 10:21:00"); echo round(abs($to_time - $from_time) / 60,2)." minute"; ?>");
All 4 Replies
Ichcha 0 Light Poster
vibhaJ 126 Master Poster
vibhaJ 126 Master Poster
lyrico 23 Junior Poster in Training
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.