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:
Terry
On 2 May 2012 22:36, Haluk Karamete wrote:
> This is my code and the output is right after that...
>
> $PDate = $row['PDate'];
> //row is tapping into ms-sq
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 "[", $PDate , "]";
echo "
On Wed, May 2, 2012 at 11: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 "[
oldDate = replace(oldDate,"August ","8/")
oldDate = replace(oldDate,"September ","9/")
oldDate = replace(oldDate,"October ","10/")
oldDate = replace(oldDate,"November ",&qu
[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 June 2010 13:40, David Stoltz wrote:
> > I would agree with you, but I have no c
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 wrote:
> I would agree with you, but I have no control on inherited web apps.
>
>
>
> I now need to concentrate o
people's stuff...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
010 8:38 AM
> To: David 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 int
On 17 June 2010 13:40, Richard Quadling wrote:
> On 17 June 2010 13:35, 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
On 17 June 2010 13:35, 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
>
>
>
> The
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 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
>
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?
take a look at these functions
http://www.php.net/mktime
ht