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.
|
|
|
|
|
![]() |
||
date format help please
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
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. |
|
|
|
#2
|
|||
|
|||
|
That formatting should be done in your server side language, PHP, ASP, etc.
|
|
#3
|
|||
|
|||
|
<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. |
|
#4
|
|||
|
|||
|
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. |
![]() |
| Tags |
| date, format, help |
| Thread Tools | |
|
|
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 |