string to unix timestamp

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eyespark
Forum Commoner
Posts: 50
Joined: Tue Jan 24, 2006 7:36 am

string to unix timestamp

Post by eyespark »

Hi

I would like to convert a date in a format

Code: Select all

date("j.m.Y")
(for example 19.5.2006) to unix timestamp. How would I do that? Thanks
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

eyespark
Forum Commoner
Posts: 50
Joined: Tue Jan 24, 2006 7:36 am

Post by eyespark »

Yeah, I was looking at that, but 19.5.2006 is not US English date format.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

If you know the format explode() it, then use mktime().
eyespark
Forum Commoner
Posts: 50
Joined: Tue Jan 24, 2006 7:36 am

Post by eyespark »

Thanks :D
Post Reply