Jump to content
xisto Community
Sign in to follow this  
shadowx

Mysql Changing Date Format Need a bit of help changi ng the date format in a table

Recommended Posts

Hello allfirstly 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 :lol:Any help greatly appriciated!NOTE: this problem is on my localhost i use for developing i havent yet tried it on my Xisto hosting sql tables, it might already be set there but i need help in setting it on my local machine.

Share this post


Link to post
Share on other sites

ThanxI 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 <_< Look out!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.