Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Dan Vesma
October 7, 2004, 5:27 am
rate this thread
I am trying to get to grips with a timesheet app. I am presenting the
user with a form to enter details of an undertaken task, including the
date on which the work was undertaken. I am using
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime
to populate an HTML form with today's day/month/year. The user can
then change this figure if the work was done the previous day, or a
month ago, or whenever.
When that form is returned, I would ideally like to store a single
number to represent the day that the work was undertaken, so that I
can sort tasks by the date undertaken. How do I get from a day, a
month and a year to the number of seconds since 1.1.1970?