Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Displaying Dates How You Want
Hello:

I have a talbe where there are 4 fields which involve dates and times. I
have a php file named output.php and here is how I am doing it:

$date1=mysql_result($result,$i,"date1");
$date2=mysql_result($result,$i,"date2");
$time1=mysql_result($result,$i,"time1");
$time2=mysql_result($result,$i,"time2");

This displays the data captured from the html form that I have. date1 &
date2 are date fields and time1 and time2 are time fields. How would I
display them? For example, date1 is now displaying like 2004-12-03. I
understand that because that is how a date field is formatted in MySQL. But
how would I get it to display, something like: Friday, 12/03/04? Same with
time...how would I format it to display say 9:00 AM instead of 09:00:00?

Thanks.

David



Report this thread to moderator Post Follow-up to this message
Old Post
C. David Rossen
11-25-04 08:56 AM


Re: Displaying Dates How You Want
On Wed, 24 Nov 2004 21:29:54 -0800, "C. David Rossen"
<cdrossen@cdrmarketing.com> wrote:
>how would I format it to display say 9:00 AM instead of 09:00:00?

<http://uk2.php.net/manual/en/function.date.php>

--
Interesting Xmas gifts: <http://www.awin1.com/tclick.php?id=405&mid=182> . <http:/
/BizOrg.co.uk/shopping/>
Locate your Mobile phone: <http://www.bizorg.co.uk/news.html>

Report this thread to moderator Post Follow-up to this message
Old Post
David Quinton
11-25-04 01:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP SQL archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:03 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.