RE: [PHP-DB] date format problem

2007-12-22 Thread Bastien Koert
www.php.net/date will show you all the possibilities of formatting the date bastien > Date: Sat, 22 Dec 2007 17:54:07 +0600 > From: [EMAIL PROTECTED] > To: php-db@lists.php.net > Subject: [PHP-DB] date format problem > > my problem is with date format >

RE: [PHP-DB] Date format problem

2003-08-14 Thread Jennifer Goodie
> > I have a field in my mysql db wich is a timestamp with the format > > mmddhhmmss > > and I would like to display it like: > > dd/mm/ > http://www.mysql.com/doc/en/Date_and_time_functions.html#IDX1333 SELECT DATE_FORMAT(timestamp_col_name, '%d/%m/%Y') FROM table_name -- PHP Datab

Re: [PHP-DB] Date format in MySQL

2003-02-03 Thread Adam Voigt
$query = mysql_query("SELECT UNIX_TIMESTAMP(fieldname) AS date WHERE id = '1';"); $array = mysql_fetch_array($query); $mydate = date("j F, Y",$array[date]); Change fieldname and the where clause, and that should work. If you want to further munipulate how it looks, just look at the dat

Re: [PHP-DB] Date format in MySQL

2003-02-03 Thread Jeffrey_N_Dyke
ewson s.utk.edu>cc: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> Subjec

Re: [PHP-DB] Date format in MySQL

2003-02-03 Thread John Krewson
strftime() offers a lot of formatting options for dates. Hope it helps. RUBANOWICZ Lisa wrote: Hi All, I have a date format of -MM-DD in MySQL and am showing it on a PHP page. However I want to show it as "2 February, 2003" or "2 February" Can someone please help me. The date will not ne

Re: [PHP-DB] date format to dateformat

2002-09-22 Thread CrossWalkCentral
What if $date="10-02-2002"; I tried it this way and the explode causes problems with the - in it What would be the best way to deal with this should i just parse out the -? "Andrey Sosnitsky" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello CrossWalkCent

Re: [PHP-DB] date format to dateformat

2002-09-22 Thread Andrey Sosnitsky
Hello CrossWalkCentral, Sunday, September 22, 2002, 7:06:18 AM, you wrote: Try this $date= "10 01 2002"; list ($day, $month, $year) = explode(" ", $date); echo "$year-$month-$day"; C> I am having problems coverting the followign date format. Does any one have C> any insight on this. C> $date=

RE: [PHP-DB] date format display

2002-06-10 Thread Gary Pullis
This is how I'd do it: $strtime = "20020531"; // Example date string // STEP 1: Turn the MMDD string into a UNIX date $unixtime = mktime(substr($strtime, 8, 2),substr($strtime, 10, 2),0,substr($strtime, 4, 2),substr($strtime, 6, 2),substr($strtime, 0, 4)); // STEP 2: Use the date() function

Re: [PHP-DB] date format display

2002-06-10 Thread Paul Burney
on 6/10/02 9:00 AM, fabrizio at [EMAIL PROTECTED] appended the following bits to my mbox: > in my mysql-db I have a date_tbl with this format: (20020531). > how is possible in PHP do display date_tbl's values in a more human-readable > format like 05-31-2002 or 31/05/2002 ? In your query, yo

Re: [PHP-DB] date format display

2002-06-10 Thread Manuel
This function will fix your date display. $sqldate="20020531"; $sqldate= fixdate($sqldate); function fixdate($data){ $aux=""; $z=0; for($i=0; $i wrote: Hello dear all, in my mysql-db I have a date_tbl with this format: (20020531). how is possible in PHP do display date_tbl's values in a

Re: [PHP-DB] date format display

2002-06-10 Thread Stuart Dallas
Monday, June 10, 2002, 2:00:59 PM, you wrote: > in my mysql-db I have a date_tbl with this format: (20020531). > how is possible in PHP do display date_tbl's values in a more human-readable > format like 05-31-2002 or 31/05/2002 ? Look at date and strtotime... http://www.php.net/date http:/

Re: [PHP-DB] date format question

2001-11-28 Thread Dobromir Velev
Hi, You could try to change date("m") to date("n"), and date("d") to date("j"). It looks that sometimes mktime() doesn't remove the trailing zeroes and returns totally different dates. The other thing you could try is $date = date("F dS, Y g:i:s A", date("U")+18000); this one takes the number se

RE: [PHP-DB] date format question

2001-11-27 Thread Beau Lebens
try "H" as your hour format (date("H")+5) although out of interest, at 9:51am, using either "g" or "H" gives me 2:51 pm HTH /beau // -Original Message- // From: Matt Nigh [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 28 November 2001 9:48 AM // To: php-db // Subject: [PHP-DB] date for

RE: [PHP-DB] Date Format

2001-07-20 Thread Michael Rudel
Hi CK, I always fetch the Date like "SELECT UNIX_TIMESTAMP(Timestamp) AS Timestamp" so you can manipulate it with all the PHP Date- and Timefunctions like date(). So you can display the date the way you asked with: $Timestamp = ; // fetch the Timestamp the way you like =8) echo date( "d-m-Y", $

RE: [PHP-DB] Date Format

2001-07-19 Thread Ben Bleything
That should do it => Good luck! Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of system Sent: Friday, July 13, 2001 8:17 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Date Format Friends, I have a design, up and running scripts connected to MySQL. Ho

Re: [PHP-DB] Date format in MSSQL

2001-07-19 Thread E. Peter K. Chan
Hi Have a look in Books Online - the e-docs for MSSQL - search for the convert function and all will be revealed. Peter - Original Message - From: "Jack" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 19, 2001 5:49 PM Subject: [PHP-DB] Date format in MSSQL > How I can