Sorry people but I'm really struggling with this and I don't know why... but still.

I have a stored unix timestamp. [a]
I have the current timestamp not in unix format (YYYY-MM-DD HH:MM:SS) [b]

I need to:
1) convert the current timestamp [b] into a unix timestamp
2) I need to take the stored timestamp away from the newly created timestamp
3) I need to add the converted timestamp onto the stored timestamp.

This is for an uptime counter that uses days hours minutes and seconds, not %.

Thanks :)

Check the PHP manual on strtotime, make sure you read the notes though as the format of your string can affect the results

aslo strftime to reverse it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.