Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $first_date = "2014-02-14 10:21:02";
- $second_date = "2014-02-14 08:21:02";
- $first_time = strtotime($first_date);
- $second_time = strtotime($second_date);
- $rand_time = rand($first_time, $second_time);
- $rand_date = date('Y-m-d g:i:s', $rand_time);
- echo $rand_date;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement