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 "[
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 "[", var_dump($row['PDate']) , "]";
echo "[", ser
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
>
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 database field is defined as varchar, not datetime...so it's a
str
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
" + lmonth + ", " + date + " " + year);
// write date to screen
document.write(todaysdate);
// end hiding-->
Hope this helps.
-Original Message-
From: Adam Williams [mailto:[EMAIL PROTECTED]
Sent: Thursday, 11 Decem
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
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?
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
> 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 d
Hi,
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?
Thanks for your help
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.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
> 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 DATE_F
>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]>
> 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
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 the name (May).
I want to convert the format to MMM, (ex: May, 2002), so I used the
mktime function. Basically I extract the
te1[0] );
Martin T
-Original Message-
From: py [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP] date conversion and calculation problem...
Hello,
I have 2 date string like this
$t1 = "2001-11-12 17:30:10";
$t2 = "2001
> 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:
So:
(apologies for stuff that doesn't work, I've coded this in
the email and not teste
Hello,
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
(because after I have another script thats converts the number of seconds to
minutes, hours or days if necessary)
I tried: (but it does n
28 matches
Mail list logo