convert time to unix timestamp
Moderator: General Moderators
-
psychotomus
- Forum Contributor
- Posts: 487
- Joined: Fri Jul 11, 2003 1:59 am
convert time to unix timestamp
how can i convert a date say "January 1 2008 1:45am" to a unix timestamp?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
strtotime() is your friend.
-
psychotomus
- Forum Contributor
- Posts: 487
- Joined: Fri Jul 11, 2003 1:59 am
what format does the date have to be in? I looked over http://php.net/strtotime and it doesnt give much detail on that. I also need to include time and date.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Code: Select all
echo strtotime('January 1 2008 1:45am');