Adam Williams wrote:
select date_format('contract.length_start', '%m-%d-%Y') as length_start
from contract where user_id = 1;
This has nothing to do with PHP, but the first parameter to date_format
should not be in quotes.
-Stut
--
http://stut.net/
--
PHP General Mailing List
no need for quotes
select date_format(contract.length_start, '%m-%d-%Y') as length_start from
contract where user_id = 1;
bastien
Date: Thu, 3 Jan 2008 08:30:55 -0600 From: [EMAIL PROTECTED] To:
php-general@lists.php.net Subject: [PHP] mysql date question I have a
field in mysql as
[snip]
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which stores it in the mysql format of -MM-DD. However, I need the
output of my select statement to show it in MM-DD- format. I can
Uhm, a shot in the dark - try:
select date_format(contract.length_start, '%m-%d-%Y') as length_start
HTH, cheers!
Silvio
Adam Williams wrote:
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which
On Thu, January 3, 2008 8:30 am, Adam Williams wrote:
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which stores it in the mysql format of -MM-DD. However, I need
the
output of my select
Ryan Schefke [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello,
I'm pulling a date in the datetime format via a MySQL query. Using PHP
I
would like to check if that date is prior to today's date. Can someone
please help with this quick question.
You could convert it to a
Shaun,
It should be: date(Y-m-d). MySQL stores the dates as -mm-dd, and that function
returns the current date on the format you need.
Check the date() function on the php manual.
--
Un gran saludo/Big regards...
Arturo Barajas, IT/Systems PPG MX (SJDR)
(427) 271-9918, x448
I have a date stored in a table in my MySQL Database using a DATE type
for
the column.
How can i compare the date in the table to today
... WHERE your_date = CURDATE() ...
e.g.
$today = mysql_result($result, $i, Booking_Date);
if($today = *HELP*){
or...
if($today == date('Y-m-d'))
I'm using php with MySql.
I'm migrating an php-oracle application to php-mysql. I need to know
if
exists any function in mysql similar to the to_char or to_date
functions
of oracle; or format function of access?. These functions make a
date
format or numeric format.
ex:
Hi,
You could write a PHP script to get all the current
values (I presume that you've put varchar as
datatype), parse them with string functions and
convert it in the way you'd like them to be. All this
is not so difficult to make.
I prefer to store my date/times in the UNIX timestamp
form. I
10 matches
Mail list logo