Re: [PHP] date conversion/extraction issues

2012-05-03 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 h1[, $PDate , ]/h1; echo

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: ?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

Re: [PHP] date conversion/extraction issues

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

RE: [PHP] Date Conversion Problem

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

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 10:13:42 AM

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 Richard Quadling
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

Re: [PHP] Date Conversion Problem

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

Re: [PHP] Date Conversion Problem

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

RE: [PHP] Date Conversion Problem

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

RE: [PHP] Date Conversion Problem

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

Re: [PHP] Date Conversion Problem

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

Re: [PHP] date conversion

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

RE: [PHP] date conversion

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

RE: [PHP] date conversion

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

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

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 a

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 is obviously the number of the month (5), not

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] Sent: Monday, August 26, 2002 3:58 PM Subject: [PHP] Date conversion problems mktime

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

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: ? Function dateTextToUnix($string) { $year = substr($string, 0, 4); $month =

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

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