[PHP] timestamp problem?

2005-02-08 Thread Balu Stefan
First of all, hello everybody, I am having some problems generating timestamps. I have a simple application, the user selects a month, a day and a year and submits it's data. Now, I want that date to be stransformed into a unixtimestamp. To do that I use strtotime('m/d/y') for 01 January 2011 it

Re: [PHP] timestamp problem?

2005-02-08 Thread Jason Wong
On Tuesday 08 February 2005 19:30, Balu Stefan wrote: Also mktime generates the second timestamp ...damn, I really don't know why there are two different timestamps for the same date. A few of PHP's date/time functions take into account the local time zone of the server. So: I use

Re: [PHP] timestamp problem?

2005-02-08 Thread Richard Lynch
Balu Stefan wrote: First of all, hello everybody, I am having some problems generating timestamps. I have a simple application, the user selects a month, a day and a year and submits it's data. Now, I want that date to be stransformed into a unixtimestamp. To do that I use

Re: [PHP] timestamp problem !!

2003-07-15 Thread Chris Boget
Hi Chris.. thanks but your code generate the following error Warning: date() [function.date]: Unexpected error in . what's wrong? any idea ?? Sorry. You just need to take out this line: echo strtotime = ($timy); either that, or change it to: echo strtotime( $timy ) . ' = ' . ($timy) .

RE: [PHP] timestamp problem !!

2003-07-15 Thread Boaz Yahav
, 2003 8:00 PM To: [EMAIL PROTECTED] Subject: [PHP] timestamp problem !! i have ?php $timy = '20030714012548'; // time stamp from MySQL echo strtotime = ($timy); $date = (Y-m-d , $timy); ? and i have a wrong result how can i extract the -MM-DD from the string $timy Please Advice

[PHP] timestamp problem !!

2003-07-14 Thread Nabil
i have ?php $timy = '20030714012548'; // time stamp from MySQL echo strtotime = ($timy); $date = (Y-m-d , $timy); ? and i have a wrong result how can i extract the -MM-DD from the string $timy Please Advice Nabil -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] timestamp problem !!

2003-07-14 Thread Chris Boget
?php $timy = '20030714012548'; // time stamp from MySQL echo strtotime = ($timy); $date = (Y-m-d , $timy); ? You are so very close! ?php $timy = '20030714012548'; // time stamp from MySQL echo strtotime = ($timy); $date = date(Y-m-d , strtotime( $timy )); ? $timy isn't a unix timestamp,

Re: [PHP] timestamp problem !!

2003-07-14 Thread Jason Wong
On Wednesday 16 July 2003 02:00, Nabil wrote: ?php $timy = '20030714012548'; // time stamp from MySQL echo strtotime = ($timy); $date = (Y-m-d , $timy); ? and i have a wrong result how can i extract the -MM-DD from the string $timy MySQL TIMESTAMP != UNIX TIMESTAMP Look up

Re: [PHP] timestamp problem !!

2003-07-14 Thread Nabil
Hi Chris.. thanks but your code generate the following error Warning: date() [function.date]: Unexpected error in . what's wrong? any idea ?? Chris Boget [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ?php $timy = '20030714012548'; // time stamp from MySQL echo strtotime =

Re: [PHP] timestamp problem !!

2003-07-14 Thread Nabil
thanks Jason, you've been always helping me ... Please i still have some fog regading this.. can u expaling me more about the timestamp and unix timestamp... and regaring me issue i have a string with '20030714012548' what ever i got it from (because i m getting this from MSSQL some time and

Re: [PHP] timestamp problem !!

2003-07-14 Thread Curt Zirzow
Nabil [EMAIL PROTECTED] wrote: thanks Jason, you've been always helping me ... Please i still have some fog regading this.. can u expaling me more about the timestamp and unix timestamp... mysql's timstamp in this case is in the format: MMDDHHMMSS Unix timstamp number of seconds

Re: [PHP] timestamp problem !!

2003-07-14 Thread myhan
mysql's timstamp in this case is in the format: MMDDHHMMSS and it's default value is current time. | TIMESTAMP(14) | MMDDHHMMSS | | TIMESTAMP(12) | YYMMDDHHMMSS | | TIMESTAMP(10) | YYMMDDHHMM | | TIMESTAMP(8) | MMDD | | TIMESTAMP(6) | YYMMDD | | TIMESTAMP(4) |

Re: [PHP] timestamp problem !!

2003-07-14 Thread myhan
The quick and easy to convert a mysql timestamp is to use the UNIX_TIMESTAMP(field_name) function in mysql when you query the data. It converts a 14-digit mysql timestamp to a standard unix timestamp. Myhan [EMAIL PROTECTED] дÈëÏûÏ¢ÐÂÎÅ :[EMAIL PROTECTED] mysql's timstamp in this case is in the