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 strtotime

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 strt

RE: [PHP] timestamp problem !!

2003-07-15 Thread Boaz Yahav
Read the last comment at the bottom of this page : http://www.weberdev.com/get_example.php3?count=787 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Nabil [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 200

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-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

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) | YY

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 secon

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 the

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] > > > $timy = '20030714012548'; // time stamp from MySQL > > echo strtotim

Re: [PHP] timestamp problem !!

2003-07-14 Thread Jason Wong
On Wednesday 16 July 2003 02:00, Nabil wrote: > $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

Re: [PHP] timestamp problem !!

2003-07-14 Thread Chris Boget
> $timy = '20030714012548'; // time stamp from MySQL > echo strtotime = ($timy); > $date = ("Y-m-d" , $timy); > ?> You are so very close! $timy isn't a unix timestamp, which is what date() is expecting. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://