On 05/02/2012 02:36 PM, Haluk Karamete wrote:
This is my code and the output is right after that...
$PDate = $row['PDate'];
//row is tapping into ms-sql date field.
//and the ms-sql data field has a value like this for the PDate;
//07/12/2001
$PDate = $PDate-date;
echo h1[, $PDate , ]/h1;
echo
Haluk,
After you retrieve the date from the database you still have to convert it
from a string to time and then to a date. Try:
?php echo date(l j M Y, , strtotime($row['PDate'])) ; ?
Terry
On 2 May 2012 22:36, Haluk Karamete halukkaram...@gmail.com wrote:
This is my code and the output is
On Wed, May 2, 2012 at 11:36 PM, Haluk Karamete halukkaram...@gmail.com wrote:
This is my code and the output is right after that...
$PDate = $row['PDate'];
//row is tapping into ms-sql date field.
//and the ms-sql data field has a value like this for the PDate;
//07/12/2001
$PDate =
; a...@ashleysheridan.co.uk;
php-general@lists.php.net
Subject: Re: [PHP] Date Conversion Problem
David,
I think it would help people like me (newbie) to know the exact
statements. Though I could envisage what you would have done with my
current learning, it would be good if I double check the statements that
went
On Thu, 2010-06-17 at 08:35 -0400, David Stoltz wrote:
PHP newbie here...
I have some PHP code writing the date/time into a MS SQL 2000 database
like this:
date('l jS \of F Y h:i:s A')
So the text it writes into the DB is like: Thursday 15th of April 2010
10:13:42 AM
I would agree with you, but I have no control on inherited web apps.
I now need to concentrate on trying to fix this.
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thursday, June 17, 2010 8:38 AM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] Date
On 17 June 2010 13:35, David Stoltz dsto...@shh.org wrote:
PHP newbie here...
I have some PHP code writing the date/time into a MS SQL 2000 database
like this:
date('l jS \of F Y h:i:s A')
So the text it writes into the DB is like: Thursday 15th of April 2010
10:13:42 AM
The
On 17 June 2010 13:40, Richard Quadling rquadl...@gmail.com wrote:
On 17 June 2010 13:35, David Stoltz dsto...@shh.org wrote:
PHP newbie here...
I have some PHP code writing the date/time into a MS SQL 2000 database
like this:
date('l jS \of F Y h:i:s A')
So the text it writes into
Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] Date Conversion Problem
On Thu, 2010-06-17 at 08:35 -0400, David Stoltz wrote:
PHP newbie here...
I have some PHP code writing the date/time into a MS SQL 2000 database
like this:
date('l jS \of F Y h:i:s A')
So the text
...not to mention I'm a
newbie, so that doesn't help ;-)
Thanks!
-Original Message-
From: Richard Quadling [mailto:rquadl...@gmail.com]
Sent: Thursday, June 17, 2010 8:47 AM
To: David Stoltz
Cc: a...@ashleysheridan.co.uk; php-general@lists.php.net
Subject: Re: [PHP] Date Conversion Problem
On 17
To: David Stoltz
Cc: a...@ashleysheridan.co.uk; php-general@lists.php.net
Subject: Re: [PHP] Date Conversion Problem
On 17 June 2010 13:40, David Stoltz dsto...@shh.org wrote:
I would agree with you, but I have no control on inherited web apps.
I now need to concentrate on trying to fix
: Thursday, June 17, 2010 8:47 AM
To: David Stoltz
Cc: a...@ashleysheridan.co.uk; php-general@lists.php.net
Subject: Re: [PHP] Date Conversion Problem
On 17 June 2010 13:40, David Stoltz dsto...@shh.org wrote:
I would agree with you, but I have no control on inherited web apps.
I now need
snip
Hi, is there a PHP function that will convert MM/DD/ to MMDD?
Also I will need to take into affect some people may put in M/D/
(some
people may put in 1 instead of 01, 2 instead of 02, etc). Is there a
way
to do this?
/snip
take a look at these functions
SCRIPT language=JavaScript
!-- Hide the script
//
// This is a y2k compliant script which prints the system date to
the screen,
//
// You may use this script in your website provided that this notice
remains at the top
//
ADAM WILLIAMS snip
Hi, is there a PHP function that will convert MM/DD/ to MMDD?
Also I will need to take into affect some people may put in M/D/
(some
people may put in 1 instead of 01, 2 instead of 02, etc). Is there a
way
to do this?
/snip
MATT MATIJEVICH snip
take a look at
when retrieving a date from MySQL in n/MM/DD, how can I present
this
to
the user of a site in readable format i.e. 19th March 2003?
SELECT DATE_FORMAT(column,' ... ') AS f_date FROM table WHERE ...
Look up DATE_FORMAT in the MySQL manual, Chapter 6. It works almost the
same as the PHP
mktime generally only works thru 2037. Why not create an array of the
months, and index in:
$months = array('Jan','Feb',);
$enddate = explode(-, $datereuslt[0]);
$finaldate = $months[$enddate-1] . -$enddate[1];
That's what I thought I might have to do. It's an alternative, but a
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 26, 2002 3:58 PM
Subject: [PHP] Date conversion problems
Having a little trouble with converting dates.
I have, in my database, a bunch of dates stored like this: -M. Month
is
obviously the number of the month (5), not
From: Matt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, August 26, 2002 5:42 PM
Subject: Re: [PHP] Date conversion problems
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 26, 2002 3:58 PM
Subject: [PHP] Date conversion problems
mktime
I have, in my database, a bunch of dates stored like this:
-M. Month is obviously the number of the month (5), not
the name (May).
I want to convert the format to MMM, (ex: May, 2002),
Do the conversion in MySQL - it'll save you grief in the long run...
SELECT
I have 2 date string like this
$t1 = 2001-11-12 17:30:10;
$t2 = 2001-11-12 17:15:32;
I need to substracts the number of seconds from $t2 from $t1
First, convert them to unix time format:
?
Function dateTextToUnix($string)
{
$year = substr($string, 0, 4);
$month =
Is this a direct copy of your code? if so, there's an error on this line
$t1 = mktime( $arr_time1[0], $arr_time1[1], $arr_time1[2], $arr_date1[1],
$arr_date1[1], $arr_date1[0] );
should be:
$t1 = mktime( $arr_time1[0], $arr_time1[1], $arr_time1[2], $arr_date1[1],
$arr_date1[2], $arr_date1[0]
22 matches
Mail list logo