By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,935 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Need Help in Calculating Unix Start time and End time.

P: 1
Hello dear friends,

i needed a help in php...suppose a user buys a service on my site and that service is for 30 days, so i just wanted to know that how to calculate expiration time (unix) from the date they purchased service...plz explain with example code...

Nov 2 '11 #1
Share this Question
Share on Google+
1 Reply

P: 1,059
use mktime function to create unix time

and finally subtract two times, dived them with (60*60*24). you will get day difference
Nov 3 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.