Re: [PHP] date conversion/extraction issues

2012-05-03 Thread Terry Ally (Gmail)
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

Re: [PHP] date conversion/extraction issues

2012-05-02 Thread Jim Lucas
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 "

Re: [PHP] date conversion/extraction issues

2012-05-02 Thread Matijn Woudt
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 "[

[PHP] date conversion/extraction issues

2012-05-02 Thread Haluk Karamete
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

RE: [PHP] Date Conversion Problem

2010-06-18 Thread David Stoltz
oldDate = replace(oldDate,"August ","8/") oldDate = replace(oldDate,"September ","9/") oldDate = replace(oldDate,"October ","10/") oldDate = replace(oldDate,"November ",&qu

Re: [PHP] Date Conversion Problem

2010-06-17 Thread Shreyas Agasthya
[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

RE: [PHP] Date Conversion Problem

2010-06-17 Thread David Stoltz
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

RE: [PHP] Date Conversion Problem

2010-06-17 Thread David Stoltz
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

Re: [PHP] Date Conversion Problem

2010-06-17 Thread Richard Quadling
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

Re: [PHP] Date Conversion Problem

2010-06-17 Thread Richard Quadling
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

Re: [PHP] Date Conversion Problem

2010-06-17 Thread Richard Quadling
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

RE: [PHP] Date Conversion Problem

2010-06-17 Thread David Stoltz
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

Re: [PHP] Date Conversion Problem

2010-06-17 Thread Ashley Sheridan
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] Date Conversion Problem

2010-06-17 Thread David Stoltz
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

RE: [PHP] date conversion

2003-12-10 Thread Daniel Purdy
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

RE: [PHP] date conversion

2003-12-10 Thread Andrew Wilson
" + 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

Re: [PHP] date conversion

2003-12-10 Thread Matt Matijevich
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

[PHP] date conversion

2003-12-10 Thread Adam Williams
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

RE: [PHP] Date Conversion

2003-03-19 Thread John W. Holmes
> 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

[PHP] Date Conversion

2003-03-19 Thread shaun
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

RE: [PHP] Date conversion problems

2002-08-27 Thread Liam . Gibbs
> 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

RE: [PHP] Date conversion problems

2002-08-26 Thread David Freeman
> 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

Re: [PHP] Date conversion problems

2002-08-26 Thread Matt
>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]>

Re: [PHP] Date conversion problems

2002-08-26 Thread Matt
> 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

[PHP] Date conversion problems

2002-08-26 Thread Liam . Gibbs
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

RE: [PHP] date conversion and calculation problem...

2001-11-12 Thread Martin Towell
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

RE: [PHP] date conversion and calculation problem...

2001-11-12 Thread Jason Murray
> 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

[PHP] date conversion and calculation problem...

2001-11-12 Thread py
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