date format help please

This is a discussion on "date format help please" within the Databases section. This forum, and the thread "date format help please are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Jun 14th, 2004, 16:00
Junior Member
Join Date: Mar 2004
Location: United Kingdom
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
date format help please

In my MySql database I have to have the date in thr following format: YYYY-MM-DD

On my web page I wish to display the date in this format: DD-MM-YYYY

Anyone any idea how this is done please.

Thanks in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Jun 14th, 2004, 18:24
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
That formatting should be done in your server side language, PHP, ASP, etc.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Jun 14th, 2004, 19:28
Junior Member
Join Date: Mar 2004
Location: United Kingdom
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by Catalyst

That formatting should be done in your server side language, PHP, ASP, etc.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

Thank Catalyst but could you please tell me how to code this in PHP.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Jun 14th, 2004, 20:09
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Take a look at the MySQL documentation:
http://dev.mysql.com/doc/mysql/en/index.html
Of interest is:
12.1.2 Overview of Date and Time Types
and
13.5 Date and Time Functions

You can then use PHP functions like split() and explode() to cut the text you get from the database into the parts (days, months and year) you want.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
date, format, help

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
JS date format joe3dge JavaScript Forum 0 May 21st, 2007 00:11
Changing date format in date picker AdRock JavaScript Forum 1 Aug 1st, 2006 17:16
How to format date/time from input box ? kahpeng Classic ASP 1 Mar 27th, 2006 05:08
Want Date Format in dd/mm/yyyy in ASP.Net With C#. frmsasp ASP.NET Forum 1 Nov 2nd, 2005 12:57
Date Format ekendricks Classic ASP 3 Sep 1st, 2003 17:03


All times are GMT. The time now is 21:51.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved