eyalrosen123rulezz Posted February 6, 2008 Share Posted February 6, 2008 Hello! What's up? How can i know if 30 minutes has been passed since a specific date and time (like 2008-02-06 14:33:11)? Many thanks! Eyal Quote Link to comment Share on other sites More sharing options...
haku Posted February 6, 2008 Share Posted February 6, 2008 Convert the time/date into a unix timestamp using mktime(), then use this code: if(time() > (earlierTime + (60*30))) { echo "More than 30 minutes has passed"; } else { echo "thirty minutes hasn't yet passed"; } Where 'earlierTime' is the time you created using mktime(). note: time() will give you the unix timestamp for the current time. Quote Link to comment Share on other sites More sharing options...
eyalrosen123rulezz Posted February 6, 2008 Author Share Posted February 6, 2008 Great! Thanks! And how can I know how many minutes have been passed? Eyal Quote Link to comment Share on other sites More sharing options...
schilly Posted February 6, 2008 Share Posted February 6, 2008 (time() - earliertime) / 60. might need to round it as well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.