RE: [PHP-DB] date()
| From: | Jeffrey_N_Dyke at Keane dot com | Date: | Mon, 18 Nov 2002 19:35:31 +0000 |
| Subject: | RE: [PHP-DB] date() | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-23456@lists.php.net to get a copy of this message | ||
whooops. I meant DATE_FORMAT. Sorry.
Jeffrey_N_Dyke
@Keane.com To: "'Edward Peloke'"
<epeloke@echoman.com>
cc: "'Php-Db'"
<php-db@lists.php.net>
11/18/2002 Subject: RE: [PHP-DB] date()
02:34 PM
you can use the mysql date function and format it as you're pulling it out
of MySql
select date(column_name, %m/%d/%Y) from table;
this will return it formatted like 11/18/2002 or there are other options.
http://www.mysql.com/doc/en/Date_and_time_functions.html
this seems to be whar you're looking for...
hth
jeff
"Aaron Wolski"
<aaronjw@marte To: "'Edward Peloke'"
<epeloke@echoman.com>, "'Php-Db'"
kbiz.com> <php-db@lists.php.net>
cc:
11/18/2002 Subject: RE: [PHP-DB] date()
02:26 PM
Hmm.. I would get it into a unix_timestamp (unless someone can suggest a
reasoning for now doing so).
Select unix_timestamp(storedDate) as date FROM SomeTable where blah
blah"
Should work like that?
Aaron
-----Original Message-----
From: Edward Peloke [mailto:epeloke@echoman.com]
Sent: November 18, 2002 2:50 PM
To: 'Php-Db'
Subject: RE: [PHP-DB] date()
it is just a datetime field and the clients use a javascript calander to
pick the date, here is the exact date as it appears in the db.
2002-11-08 00:00:00
Eddie
-----Original Message-----
From: Aaron Wolski [mailto:aaronjw@martekbiz.com]
Sent: Monday, November 18, 2002 2:05 PM
To: 'Edward Peloke'; 'Php-Db'
Subject: RE: [PHP-DB] date()
Ok..
I guess it depends on how your date is stored. I always use
unix_timestamps.
If you are too.. then the format I supplied should work as indicated.
Aaron
-----Original Message-----
From: Edward Peloke [mailto:epeloke@echoman.com]
Sent: November 18, 2002 2:19 PM
To: 'Php-Db'
Subject: RE: [PHP-DB] date()
When I use this, I get 12/31/69 as my date.
-----Original Message-----
From: Aaron Wolski [mailto:aaronjw@martekbiz.com]
Sent: Wednesday, November 13, 2002 4:04 PM
To: 'Edward Peloke'; 'Php-Db'
Subject: RE: [PHP-DB] date()
$date = date("m:d:y", $myrow[datefield]);
Will produce: 11:13:02
http://www.php.net/manual/en/function.date.php
Aaron
-----Original Message-----
From: Edward Peloke [mailto:epeloke@echoman.com]
Sent: November 13, 2002 4:27 PM
To: Php-Db
Subject: [PHP-DB] date()
I have a date field in my mysql db, when I output the data to the
screen, I
don't want to see the minutes, just the mmddyy. I can format a date but
can't seem to get it to work passing in the value from
$myrow["datefield"]....any ideas? I don't want to have to worry about
just
pulling what I want in the select clause, I just want to format it when
I
diplay it.
Thanks,
Eddie
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php