|
|
|
|
![]() ![]() |
May 1 2006, 03:12 PM
Post
#1
|
|
|
A clever man learns from his own mistakes, a WISE man learns from those of OTHERS ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 937 Joined: 12-April 06 From: Essex, UK Member No.: 21,719 |
Hello all
firstly sorry if this is in the wrong forum it just seemed the most appropriate Im using a mysql database with some php scripts to hopefully make a forum (fingers crossed!). the problem is the date format in the tables, its the form of yyyy-mm-dd which seems stupid to me as im used to dd-mm-yyyy. Is it possible to change the date format of the table so when i enter a date it is stroed as dd-mm-yyyy? Ive tried looking in the config.inc.php file and couldnt find a date format line so i guessed that wasnt much use. The way im interacting with the talbe is by using php so it is possible to format it using php but to be honest i cant be bothered! I'd rather have the table store it the way i want it to be stored. Ive also read documentation but couldnt find it Any help greatly appriciated! NOTE: this problem is on my localhost i use for developing i havent yet tried it on my trap17 hosting sql tables, it might already be set there but i need help in setting it on my local machine. |
|
|
|
May 1 2006, 03:58 PM
Post
#2
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,969 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
Check out the mysgl date_format function.
|
|
|
|
May 1 2006, 04:56 PM
Post
#3
|
|
|
A clever man learns from his own mistakes, a WISE man learns from those of OTHERS ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 937 Joined: 12-April 06 From: Essex, UK Member No.: 21,719 |
Thanx
I did some googling and got some results i think it might take some fiddling to get more used to it but thanks. One day ill rival the IPB boards |
|
|
|
May 1 2006, 05:12 PM
Post
#4
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,969 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
What you want is to break a date down into its parts: month, day, year. You can do this by applying the MySQL date functions, like YEAR(), MONTH(), DAY() (I think) to the date when you select it. Then you'll have just the numeric values.
I'm looking forward to seeing the results... |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 30th August 2008 - 05:54 AM |