Re: [PHP] Date formatting issue

2008-08-05 Thread Daniel Brown
On Tue, Aug 5, 2008 at 11:48 AM, Don Don <[EMAIL PROTECTED]> wrote: > Hi all, > > I've got dates in the following formats e.g. > > August 05, 2008, 10:14 am (e.g. today's date) > August 04, 2008, 7:08 am (e.g. yesterda's date) > August 03, 2008, 9:08 am (e.g. in the past) > > I am trying to format

Re: [PHP] Date formatting issue

2008-08-05 Thread Dan Joseph
On Tue, Aug 5, 2008 at 11:48 AM, Don Don <[EMAIL PROTECTED]> wrote: > Hi all, > > I've got dates in the following formats e.g. > > August 05, 2008, 10:14 am (e.g. today's date) > August 04, 2008, 7:08 am (e.g. yesterda's date) > August 03, 2008, 9:08 am (e.g. in the past) > > I am trying to format

[PHP] Date formatting issue

2008-08-05 Thread Don Don
Hi all, I've got dates in the following formats e.g. August 05, 2008, 10:14 am (e.g. today's date) August 04, 2008, 7:08 am (e.g. yesterda's date) August 03, 2008, 9:08 am (e.g. in the past) I am trying to format these dates do I can display them like this Today at 10:14 am (today) Yesterday at

Re: [PHP] date formatting

2007-08-29 Thread Richard Lynch
On Wed, August 29, 2007 4:12 pm, Mike Ryan wrote: > I would like to have my users input the date formate as mm-dd- > mysql > wants the data to come down as -mm-dd. > > The question I have is how do I convert from the mm-dd- to > -mm-dd so > that I can write it out to the database?

Re: [PHP] date formatting

2007-08-29 Thread Wolf
Just have your input form get it in sections, then piece it all together when dumping it to MySQL This way you can transparent the code on the front to users, but have it in the right format in the backend. Mike Ryan <[EMAIL PROTECTED]> wrote: > I would like to have my users input the dat

[PHP] date formatting

2007-08-29 Thread Mike Ryan
I would like to have my users input the date formate as mm-dd- mysql wants the data to come down as -mm-dd. The question I have is how do I convert from the mm-dd- to -mm-dd so that I can write it out to the database? -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] date formatting - no question here just a tip ...

2006-12-14 Thread Jochem Maas
have you ever had the need to programmatically convert a date() compatible date formatting string with one compatible for strftime()? I had this problem recently when I had to l10n an existing app (and support legacy data - which include date() formatting strings - at the same time) ... I came up

Re: [PHP] Date Formatting

2002-12-13 Thread Clint Tredway
thanks for all the replies. I was able to use the date_format() from MySQL. Clint - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "Clint Tredway" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, December 13, 2002 1:13 PM Subjec

Re: [PHP] Date Formatting

2002-12-13 Thread Rick Emery
iday, December 13, 2002 11:55 AM Subject: [PHP] Date Formatting How can I format a date coming out of a MySQL? I know how to format today's date but not a date coming out of MySQL. I have looked through the manual, but I must be blind because I cannot figure it out. Thanks, Clint -- PHP Gen

Re: [PHP] Date Formatting

2002-12-13 Thread 1LT John W. Holmes
edway" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 13, 2002 12:55 PM Subject: [PHP] Date Formatting How can I format a date coming out of a MySQL? I know how to format today's date but not a date coming out of MySQL. I have looked through the manual, bu

Re: [PHP] Date Formatting

2002-12-13 Thread Joseph W. Goff
Oct 277' - Original Message - From: "Clint Tredway" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 13, 2002 11:55 AM Subject: [PHP] Date Formatting How can I format a date coming out of a MySQL? I know how to format today's date b

Re: [PHP] Date Formatting

2002-12-13 Thread Support @ Fourthrealm.com
Use this: function makedate($format, $indate) { $temp = explode("-", $indate); $fulldate = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]); $temp = date($format, $fulldate); return ($temp); } and call it with thi

[PHP] Date Formatting

2002-12-13 Thread Clint Tredway
How can I format a date coming out of a MySQL? I know how to format today's date but not a date coming out of MySQL. I have looked through the manual, but I must be blind because I cannot figure it out. Thanks, Clint

Re: [PHP] Date formatting from a mySQL timestamp

2002-10-16 Thread 1LT John W. Holmes
> I have the following query : > for($i = 0; $i <=$num_results; $i++) > { > $row = mysql_fetch_object($result); > echo "\n" >."\n" You can save some typing if you just set the bgcolor in the , instead of each , FYI. Also, align defaults to "left", doesn't it? So you can probably leave tha

[PHP] Date formatting from a mySQL timestamp

2002-10-16 Thread Ricardo Fitzgerald
Hi, I have the following query : for($i = 0; $i <=$num_results; $i++) { $row = mysql_fetch_object($result); echo "\n" ."\n" ."$row->id\n" ."$row->Nombre\n" ."$row->Apellido\n" ."$row->Direccion\n" ."$row->Ciudad\n" ."$row->Telefono\n" ."$row

Re: [PHP] Date formatting

2002-07-10 Thread Analysis & Solutions
On Wed, Jul 10, 2002 at 12:25:08PM -0500, Rw wrote: > > "01-02-2003" > > Is there a handy function to convert that to other ways of expressing the > date such as: > > "01/02/03" $temp = preg_replace('/^(\d{2})-(\d{2})-(\d{2})(\d{2})$/', '\\1/\\2/\\4', $date); > "2003-01-02" $temp = preg_r

RE: [PHP] Date formatting

2002-07-10 Thread Dan Vande More
From: Rw [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 11:25 AM To: [EMAIL PROTECTED] Subject: [PHP] Date formatting Had trouble getting this posed at the newsgroup - will try on the maillist here: I have a date field passed in a form like this: "01-02-2003" Is there a ha

[PHP] Date formatting

2002-07-10 Thread Rw
Had trouble getting this posed at the newsgroup - will try on the maillist here: I have a date field passed in a form like this: "01-02-2003" Is there a handy function to convert that to other ways of expressing the date such as: "01/02/03" OR "2003-01-02" I know the syntax of the date form

[PHP] Date Formatting/Reading

2001-12-13 Thread PHPGalaxy.com
Hi! =) I'm doing a website that will be using a pay-per-month membership program. There's a field for 'lastpaid' that holds the date the last paid (sorry to state the obvious). My questions are these: 1) What would be the best way to format it so PHP can see if it's been 30 days since it was last

Re: [PHP] Date formatting

2001-12-11 Thread Miles Thompson
Here, play with this. dtAuctionStart is a MySQL date field, so substitute your own connection and var. Have fun - Miles Thompson Some messing about with dates = "; echo date ("Y-m-d", $dtAuctionStart ), ""; //$strDate = $dtAuctionStart ; echo "dtAuctionStart : $dt

Re: [PHP] Date formatting

2001-12-11 Thread Steve Cayford
On Monday, December 10, 2001, at 09:35 PM, phantom wrote: > What would be an easy what to format a date value into month day year?? > I want to specially display a date stored in mysql in date format > -MM-DD > > The manual says: string date (string format, int [timestamp]) > > I tried $For

Re: [PHP] Date formatting

2001-12-11 Thread Kevin Stone
OTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 10, 2001 8:35 PM Subject: [PHP] Date formatting > What would be an easy what to format a date value into month day year?? > I want to specially display a date stored in mysql in date format > -MM-DD > > The manual

[PHP] Date formatting

2001-12-11 Thread phantom
What would be an easy what to format a date value into month day year?? I want to specially display a date stored in mysql in date format -MM-DD The manual says: string date (string format, int [timestamp]) I tried $FormattedDate = date("F y, Y",${StoredDate}) 1999-04-15 spit out December 3

Re: [PHP] Date formatting in PHP 3.0

2001-08-30 Thread
From: Paul McGee <[EMAIL PROTECTED]> Date: Thu, Aug 30, 2001 at 12:45:49PM -0400 Message-ID: <[EMAIL PROTECTED]> Subject: Re: [PHP] Date formatting in PHP 3.0 > Thanks, I knew it was something stupid! > > However, the $dy = date ("D", $row[0]) doesn't work.

Re: [PHP] Date formatting in PHP 3.0

2001-08-30 Thread Paul McGee
hu, Aug 30, 2001 at 12:13:21PM -0400 > Message-ID: <[EMAIL PROTECTED]> > Subject: [PHP] Date formatting in PHP 3.0 > > > I'm looping through a MSQL db pulling out the dates where I would like to > > display the date and then the day of the week. The problem is that ev

Re: [PHP] Date formatting in PHP 3.0

2001-08-30 Thread
From: Paul McGee <[EMAIL PROTECTED]> Date: Thu, Aug 30, 2001 at 12:13:21PM -0400 Message-ID: <[EMAIL PROTECTED]> Subject: [PHP] Date formatting in PHP 3.0 > I'm looping through a MSQL db pulling out the dates where I would like to > display the date and then the day of th

[PHP] Date formatting in PHP 3.0

2001-08-30 Thread Paul McGee
I'm looping through a MSQL db pulling out the dates where I would like to display the date and then the day of the week. The problem is that every date returns the same day of the week, Wed. I checked the documentation and it doesn't say anything about the expression only being executed once duri

Re: [PHP] Date formatting

2001-04-06 Thread Joe Stump
You need a UNIX timestamp for the second argument in date() - thus you need to first convert your $even into a timestamp (number of seconds past 1970). That would work ... --Joe On Fri, Apr 06, 2001 at 01:13:59PM +0100, Matt Davis wrote: > Hi I am trying to format a date extracted from my DB.

Re: [PHP] Date formatting

2001-04-06 Thread Joe Sheble (Wizaerd)
Something I almost always do when pulling dates from a mySQL table is format the date column in the query itself using the mySQL function DATE_FORMAT()... At 01:13 PM 4/6/01 +0100, Matt Davis wrote: >Hi I am trying to format a date extracted from my DB. I have run my query >and then have used

[PHP] Date formatting

2001-04-06 Thread Matt Davis
Hi I am trying to format a date extracted from my DB. I have run my query and then have used the following to get my row data while ($row = mysql_fetch_array($sql_result)) { $title = $row["message_title"]; $message = $row["message"]; $event

Re: [PHP] Date Formatting

2001-02-06 Thread Steve Edberg
At 3:04 PM -0800 2/6/01, Richard Scott Crawford wrote: >Cold Fusion has a wonderful function called CreateODBCDate(), which >takes as an argument any date in just about any format and returns a >standard ODBC date format that you can plug into a database without >worrying about conversion. > >D

[PHP] Date Formatting

2001-02-06 Thread Richard Scott Crawford
Cold Fusion has a wonderful function called CreateODBCDate(), which takes as an argument any date in just about any format and returns a standard ODBC date format that you can plug into a database without worrying about conversion. Does PHP have a similar function? I've looked for one but can