and PHP doc's writers are so talented and organised!
Ta ta !!
- Original Message -
From: Gerry Danen [EMAIL PROTECTED]
To: xkorakidis [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Monday, January 30, 2006 8:34 AM
Subject: Re: [PHP-DB] timestamp value management
I use this function
hi guys!
I'm trying to manage a table containing a timestamp colum
- when I insert a record, I don't fill a value in timestamp column, so
current timestamp is inserted. The inserted value is smth like
20060129213253
- when I try to show this value in a php page, I use
date($varOfTimestampColumn)
So, you want the maximum date of the result set? Just use SQL:
select max(datecolumn) from table where (conditions);
-Micah
On Monday 30 January 2006 1:03 pm, xkorakidis wrote:
hi guys!
I'm trying to manage a table containing a timestamp colum
- when I insert a record, I don't fill a
the timestamp of mysql is only the date without any spacers. the php timestamp
is a unix-timestamp (seconds since 01.01.1970) so you can´t convert your
record-value to an normally date directly. you have to use split out the year,
the month etc. manually. (or is there a function for it? don´t
I use this function:
functionxlate_datetime($in_field, $in_format)
{
// 2005-10-02 18:05:52
// 0123456789012345678
$year = substr( $in_field, 0, 4 );
$month = substr( $in_field, 5, 2 );
$day= substr( $in_field, 8, 2 );
$hour =
Hi there everyone,
I have to convert dates in the following format to a valid unix timestamp to
be stored in a mysql DB, how should I write it for this format?
12/03/04 (Day,month,year)
I'm not sure how to format it correctly.
I've tried to following but I don't think it's right:
relevant code
bastien
From: Balwant Singh [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Bastien Koert [EMAIL PROTECTED]
CC: php-db@lists.php.net
Subject: RE: [PHP-DB] timestamp
Date: 01 Feb 2005 10:13:40 +0530
dear bastien
thanks for the reply... but i checked
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
-Original Message-
From: Balwant Singh [mailto:[EMAIL PROTECTED]
Sent: 01 February 2005 08:08
on echoing $timestamp i m getting Fri Jan 28 19:53:09 2005
but on
Subject: RE: [PHP-DB] timestamp
Date: 31 Jan 2005 10:02:04 +0530
thanks
I tried strtotime also but getting 1970-01-01 not 2005-01-28. my
problem is that the date is given to me in string format i.e.Fri Jan 28
19:53:09 2005. Any other help will be appreciated.
with best wishes
balwant
On Sat, 2005
,strtotime($timestamp));
echo $date;
?
gave me this result
2005-01-28
Exactly as it should.
Bastien
From: Balwant Singh [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Bastien Koert [EMAIL PROTECTED]
CC: php-db@lists.php.net
Subject: RE: [PHP-DB] timestamp
Date: 31 Jan 2005 10:02
pls post relevant code
bastien
From: Balwant Singh [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Bastien Koert [EMAIL PROTECTED]
CC: php-db@lists.php.net
Subject: RE: [PHP-DB] timestamp
Date: 01 Feb 2005 10:13:40 +0530
dear bastien
thanks for the reply... but i checked it again
PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Bastien Koert [EMAIL PROTECTED]
CC: php-db@lists.php.net
Subject: RE: [PHP-DB] timestamp
Date: 01 Feb 2005 10:13:40 +0530
dear bastien
thanks for the reply... but i checked it again but it is giving only
1970-01-01. is something else needs
-db@lists.php.net
Subject: RE: [PHP-DB] timestamp
Date: 31 Jan 2005 10:02:04 +0530
thanks
I tried strtotime also but getting 1970-01-01 not 2005-01-28. my
problem is that the date is given to me in string format i.e.Fri Jan 28
19:53:09 2005. Any other help will be appreciated.
with best wishes
wishes
balwant
On Tue, 2005-02-01 at 10:33, Bastien Koert wrote:
pls post relevant code
bastien
From: Balwant Singh [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Bastien Koert [EMAIL PROTECTED]
CC: php-db@lists.php.net
Subject: RE: [PHP-DB] timestamp
Date: 01 Feb 2005 10:13:40 +0530
From: Balwant Singh [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Bastien Koert [EMAIL PROTECTED]
CC: php-db@lists.php.net
Subject: RE: [PHP-DB] timestamp
Date: 01 Feb 2005 10:13:40 +0530
dear bastien
thanks for the reply... but i checked it again but it is giving only
1970-01-01. is something
]
To: php-db@lists.php.net
Subject: [PHP-DB] timestamp
Date: 29 Jan 2005 19:47:35 +0530
i am facing a problem
i have timestamp in string format -- Fri Jan 28 19:53:09 2005 now i
want to get the date from it. is it possible? pls. help. on using
strftime(%D,$timestamp) it is giving 01/01/70
,$tmstmp);
Cheers,
Dianne
- Original Message -
From: Balwant Singh [EMAIL PROTECTED]
To: Bastien Koert [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Sunday, January 30, 2005 11:32 PM
Subject: RE: [PHP-DB] timestamp
thanks
I tried strtotime also but getting 1970-01-01 not 2005
i am facing a problem
i have timestamp in string format -- Fri Jan 28 19:53:09 2005 now i
want to get the date from it. is it possible? pls. help. on using
strftime(%D,$timestamp) it is giving 01/01/70. May pls. help me.
Also pls. let me know whether calculation can be done in mysql on this
PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] timestamp
Date: 29 Jan 2005 19:47:35 +0530
i am facing a problem
i have timestamp in string format -- Fri Jan 28 19:53:09 2005 now i
want to get the date from it. is it possible? pls. help. on using
strftime(%D,$timestamp) it is giving 01/01/70
Balwant - according to
http://php.planetmirror.com/manual/en/ref.datetime.php shouldn't you be
using
http://php.planetmirror.com/manual/en/ref.datetime.phpfunction.strtotime.phpstrtotime
rather than strftime for this ? strftime needs input of a timestamp a large
Int32 Unix Timestamp), where
I'm trying to format a MySQL Timestamp Column Type with PHP, and it's not
going well. In reading up on it, I see that the idea is to convert the
Timestamp type to Unix format using the strtotime() function, then using the
date() function to format that result. However, this only appears to work
this is a common mysql timestamp problem, you can try using
DATE_FORMAT(datefield, FORMAT) sql function to define the date, or store the
timestamp as a unix timestamp (an integer) from the get go
bastien
From: Doug Parker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] timestamp
PROTECTED]
Enviada: quinta-feira, 18 de Novembro de 2004 18:47
Para: [EMAIL PROTECTED]
Assunto: [PHP-DB] timestamp problem
I'm trying to format a MySQL Timestamp Column Type with PHP, and it's not
going well. In reading up on it, I see that the idea is to convert the
Timestamp type to Unix format
Doug Parker wrote:
I'm trying to format a MySQL Timestamp Column Type with PHP, and it's not
going well. In reading up on it, I see that the idea is to convert the
Timestamp type to Unix format using the strtotime() function, then using the
date() function to format that result. However, this
Ok, thanks for the input. I knew that was an option as well, the problem is
that I have about eight different dates in the query, and I'd rather do a
query like SELECT projects.* FROM projects... and then format those
results, rather than do SELECT DATE_FORMAT('%m %d %Y', projects.Date1) AS
From: Aaron Wolski [EMAIL PROTECTED]
Having a brain laps and not sure where in the manual to look and sadly I
need a QUICK solution.
I have a date formatted in a table like: 20030826132457
Now.. I went to MySQL timestamp from UNIX timestamps because I like the
readability of them when just
Hi All,
Having a brain laps and not sure where in the manual to look and sadly I
need a QUICK solution.
I have a date formatted in a table like: 20030826132457
Now.. I went to MySQL timestamp from UNIX timestamps because I like the
readability of them when just looking at the Tables. How
Please help me how to print a timestamp string retrived from the database,
and print it as -MM-DD
Nabil
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nabil wrote:
Please help me how to print a timestamp string retrived from the database,
and print it as -MM-DD
use the mysql date_format fumction
DATE_FORMAT(date,format)
select date_format(date_field, '%Y-%m-%d') from data;
see the mysql docs for more details
--
Sean
--
PHP Database
I'm using the timestamp column type in a database, and the only problem
is that it the stamp is three hours prior to the actual post when I post
to a remote server. I'm assuming, since it works fine on my machine,
that this is because the remote server I am is in a different time
zone. Is there
I'm using the timestamp column type in a database, and the only
problem
is that it the stamp is three hours prior to the actual post when I
post
to a remote server. I'm assuming, since it works fine on my machine,
that this is because the remote server I am is in a different time
zone. Is
Good afternoon, Houston i have a problem. :-) Just to play a while.
Is like this i have a field in MySql TIME_STAMP int(11) and he has a time
stamp value (ex: 1045738710) and i want to make show it like a date format
in the web. Can anyone help me on this...?
Cumprimentos
Bruno Pereira
Is like this i have a field in MySql TIME_STAMP int(11) and he has a time
stamp value (ex: 1045738710) and i want to make show it like a date format
in the web. Can anyone help me on this...?
Just SELECT it out and run it through the PHP date() function to format it.
www.php.net/date
: [PHP-DB] TimeStamp format to date
Is like this i have a field in MySql TIME_STAMP int(11) and
he has a time
stamp value (ex: 1045738710) and i want to make show it
like a date format
in the web. Can anyone help me on this...?
Just SELECT it out and run it through the PHP date
--- 1LT John W. Holmes [EMAIL PROTECTED] wrote:
Cumprimentos
What'd you call me?
I think he's offering you a free minty freshmaker.
=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a right unless you are willing to fight to
: [PHP-DB] TimeStamp format to date
--- 1LT John W. Holmes [EMAIL PROTECTED] wrote:
Cumprimentos
What'd you call me?
I think he's offering you a free minty freshmaker.
=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand
W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: quinta-feira, 20 de Fevereiro de 2003 15:37
To: Bruno Pereira; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] TimeStamp format to date
Is like this i have a field in MySql TIME_STAMP int(11) and he has a time
stamp value (ex: 1045738710) and i want to make
: RE: [PHP-DB] TimeStamp format to date
Dude, you just topped John! That was laugh-out-loud hilarious. Sorry this
has gotten off-topic, but c'mon. A freshmaker? Classic, just classic.
Rich
-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 12:09
Hi there,
I am playing around with the timestamp functions I created a timestamp with
mysql ( the row is timestamp)
and do reformat this thing after selecting with php in the folowíng way:
$date_posted[$i] = strftime(%A, %d-%m-%Y %R, $date_posted[$i]);
This always returns Tuesday, 19-01-2038
39 matches
Mail list logo