RE: [PHP] PHP- Converting to and from TIMESTAMPS

2003-05-30 Thread John W. Holmes
> I am wanting one field on a table in one of my MYSQL databases to contain > different dates and times as a epoch timestamps. > > Firstly how do I convert a particular time and date which the user will > enter on the website into the epoch timestamp. $db_timestamp = strtotime($user_input); > A

Re: [PHP] PHP- Converting to and from TIMESTAMPS

2003-05-30 Thread Leif K-Brooks
If you'd bothered to RTFM, you'd know both answers already. strtotime() for number one, and date() accepts an optional second argument (the timestamp). Ian Gray wrote: I am wanting one field on a table in one of my MYSQL databases to contain different dates and times as a epoch timestamps. Fi

Re: [PHP] PHP- Converting to and from TIMESTAMPS

2003-05-30 Thread David Grant
Ian Gray wrote: I am wanting one field on a table in one of my MYSQL databases to contain different dates and times as a epoch timestamps. You're better off storing as a DATETIME field -- it has limits from 1000-01-01 to -12-31, instead of 1970 to 2037.. Firstly how do I convert a particular