Re: [PHP-DB] timestamp value management

2006-02-01 Thread Julien Bonastre
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

[PHP-DB] timestamp value management

2006-01-29 Thread xkorakidis
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)

Re: [PHP-DB] timestamp value management

2006-01-29 Thread Micah Stevens
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

Re: [PHP-DB] timestamp value management

2006-01-29 Thread Jan Pieper
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

Re: [PHP-DB] timestamp value management

2006-01-29 Thread Gerry Danen
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 =

[PHP-DB] Timestamp question

2005-03-22 Thread Chris Payne
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:

Re: [PHP-DB] timestamp

2005-02-01 Thread Balwant Singh
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

RE: [PHP-DB] timestamp

2005-02-01 Thread Ford, Mike
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

RE: [PHP-DB] timestamp

2005-01-31 Thread Bastien Koert
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

RE: [PHP-DB] timestamp

2005-01-31 Thread Balwant Singh
,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

RE: [PHP-DB] timestamp

2005-01-31 Thread Bastien Koert
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

RE: [PHP-DB] timestamp

2005-01-31 Thread Balwant Singh
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

Re: [PHP-DB] timestamp

2005-01-31 Thread graeme
-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

Re: [PHP-DB] timestamp

2005-01-31 Thread graeme
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

Re: [PHP-DB] timestamp

2005-01-31 Thread graeme
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

RE: [PHP-DB] timestamp

2005-01-30 Thread Balwant Singh
] 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

Re: [PHP-DB] timestamp

2005-01-30 Thread Dianne Mead
,$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

[PHP-DB] timestamp

2005-01-29 Thread Balwant Singh
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

RE: [PHP-DB] timestamp

2005-01-29 Thread Bastien Koert
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

Re: [PHP-DB] timestamp

2005-01-29 Thread Neil Smith [MVP, Digital media]
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

[PHP-DB] timestamp problem

2004-11-18 Thread Doug Parker
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

RE: [PHP-DB] timestamp problem

2004-11-18 Thread Bastien Koert
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

RE: [PHP-DB] timestamp problem

2004-11-18 Thread Rodrigo Cabeceiras
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

Re: [PHP-DB] timestamp problem

2004-11-18 Thread John Holmes
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

Re: [PHP-DB] timestamp problem

2004-11-18 Thread Doug Parker
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

Re: [PHP-DB] timestamp formatting on display?

2003-08-27 Thread CPT John W. Holmes
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

[PHP-DB] timestamp formatting on display?

2003-08-26 Thread Aaron Wolski
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

[PHP-DB] TIMESTAMP - Y-m-d

2003-06-05 Thread nabil
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

Re: [PHP-DB] TIMESTAMP - Y-m-d

2003-06-05 Thread Sean Burlington
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

[PHP-DB] timestamp problem

2003-03-13 Thread drparker
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

RE: [PHP-DB] timestamp problem

2003-03-13 Thread John W. Holmes
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

[PHP-DB] TimeStamp format to date

2003-02-20 Thread Bruno Pereira
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

Re: [PHP-DB] TimeStamp format to date

2003-02-20 Thread 1LT John W. Holmes
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

RE: [PHP-DB] TimeStamp format to date

2003-02-20 Thread Hutchins, Richard
: [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

Re: [PHP-DB] TimeStamp format to date

2003-02-20 Thread Mark
--- 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

RE: [PHP-DB] TimeStamp format to date

2003-02-20 Thread Hutchins, Richard
: [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

RE: [PHP-DB] TimeStamp format to date

2003-02-20 Thread Bruno Pereira
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

2003-02-20 Thread Bruno Pereira
: 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

[PHP-DB] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Andy
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