D
Dan Vesma
Good morning,
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
time;
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?
Any clues?
Thanks,
Daniel V
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
time;
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?
Any clues?
Thanks,
Daniel V