Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Mysql Changing Date Format, Need a bit of help changi ng the date format in a table
shadowx
post 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 smile.gif

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 sad.gif

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.
Go to the top of the page
 
+Quote Post
jlhaslip
post 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 Icon

Group: [MODERATOR]
Posts: 3,969
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



Check out the mysgl date_format function.
Go to the top of the page
 
+Quote Post
shadowx
post 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 tongue.gif Look out!
Go to the top of the page
 
+Quote Post
jlhaslip
post 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 Icon

Group: [MODERATOR]
Posts: 3,969
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



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...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Converting Video Files From One Format To Another(6)
  2. Complete Login System(57)
  3. Increment A Mysql Column(7)
  4. Import From Excel File Into Mysql Database(8)
  5. Changing A Gmail Password(10)
  6. Changing Background Color In Php(5)
  7. Ie Table Width In A Div Tag(5)
  8. Subquery In Mysql(5)
  9. Adding Rows & Columns In Html Table Using Javascript(1)
  10. Muslims Not Allowed To Date(9)
  11. My First Date With A Girl!(25)
  12. Personality Test - With Birth Date(18)
  13. Changing Legal Age For Driving(43)
  14. Qupis : Free Hosting With Php, Mysql, Cpanel. (one Line Text Ad At Bottom)(41)
  15. Mysql Won't Update(4)
  1. Online Date Scams(5)
  2. Database With Mysql++(7)
  3. Mysql, Php, Apache Downloads And Setup Was A Nightmare(10)
  4. Html Form!(4)
  5. How Do I Find My Mysql Password? [resolved](5)
  6. Question About Changing Domain Names.(8)
  7. Date Time Lights Temp And Timer, It's Go It All(0)
  8. It Went Well For A While(5)
  9. Changing Hosts?(1)
  10. How To Implement A Date Picker On A Web Page(0)
  11. Help! Mk1 Conversion To Kar Format(0)
  12. Mysql Db Is Down Getting Following Error(2)
  13. Need Advice On Setting Up Mysql Database.(3)


 



- Lo-Fi Version Time is now: 30th August 2008 - 05:54 AM