Link to home
Start Free TrialLog in
Avatar of mhouldridge
mhouldridge

asked on

Today's date and time in seconds

Experts,

I need to create today's date and time in seconds for a unique invoice reference.
Avatar of wakemup
wakemup

PHP's time() wil give you a unix timestamp which is seconds since 1st January 1970.

You'll only have a 1 second resolution though so if you're getting more than one request per second you'll need to use microtime() or some such depending upon your platform.
ASKER CERTIFIED SOLUTION
Avatar of raja_ind82
raja_ind82
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial