T
Tyler Cruz
Hi,
I have a database where a date is entered through a form via a user in the
format (YYYY-MM-DD) format and then converted to epoch, and stored in a
MySQL database. The reverse is done when extracting this information from
the database and posting it to the web.
However, since epoch is measured from January 1, 1970, I cannot enter dates
earlier than that period. I had wanted to store the dates in epoch as it
makes for easy parsing with the POSIX module, as well as allowing MySQL to
sort by date through epoch. This is why I didn't want to simply return a
string as a date; sorting would be out of the question.
Could somebody please help me?
Thanks,
Tyler Cruz
I have a database where a date is entered through a form via a user in the
format (YYYY-MM-DD) format and then converted to epoch, and stored in a
MySQL database. The reverse is done when extracting this information from
the database and posting it to the web.
However, since epoch is measured from January 1, 1970, I cannot enter dates
earlier than that period. I had wanted to store the dates in epoch as it
makes for easy parsing with the POSIX module, as well as allowing MySQL to
sort by date through epoch. This is why I didn't want to simply return a
string as a date; sorting would be out of the question.
Could somebody please help me?
Thanks,
Tyler Cruz