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
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
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 w
, 2003 8:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] timestamp problem !!
i have
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 unsubscribe, visit: http://www.php.net
> 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
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
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
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
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
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
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
> $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://
i have
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 unsubscribe, visit: http://www.php.net/unsub.php
13 matches
Mail list logo