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

free web hosting
Open Discussion > CONTRIBUTE > Computers

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

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

 

 

 


Reply

jlhaslip
Check out the mysgl date_format function.

Reply

shadowx
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!

Reply

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

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Similar Topics

Keywords : mysql, changing, date, format, bit, changi, ng, date, format, table

  1. Firefox And Ie: Table Layouts Look Different In Us!
    A Discussion on Why These Major Browsers Display Different Table Layou (3)
  2. Mysql Hacks
    (1)
    There are MySQL hacks out there, They can travel from your website to your computers. One of these
    are the MySQL injectors. The injection drops your tables and shuts down the program permanently. Be
    careful of these hacks, as they can destroy your MySQL related websites, programs, etc.....
  3. Changing Isps
    A unique view into the lives of Statesmen and RadioChick (7)
    Here in New Zealand, our Internet access is stifled, nay, strangled by the ex-State Owned monopoly
    company Telecom, which with deregulation in the early 1980's was split off from the New Zealand
    Post Office (a government department), and became one of the first fully privatized telcos in the
    world by 1990. And yet, this monolithic corporation that sends most of its profits off-shore these
    days, still for the longest time (until 2006 officially) maintained control over the telephone
    infrastructure of New Zealand, including that all important "local loop", the cable fr....
  4. Creating A Php Login System Using Mysql
    I need help in creating a login system, what I want is a login system (10)
    Hey everyone! I am helping someone make a login system using MySQL databases and a PHP login
    form. I have a fair bit of experiance in HTML and some javascript too. I have virtually no
    experiance in MySQL or PHP. Anybody know of any good PHP login systems that allow you to creat a
    personalised page for each user and when they login the system transfers the user to their page.
    Another thing that the system MUST have is a way of stopping unwanted users entering someones page.
    CODE For example lets say I register and my UN is jesse123 and my personalised pages a....
  5. Mysql Database Not Working
    (3)
    well i'm getting an error message(a databass connection warning) for all of the parts of my site
    that connects to a mysql database i check my database users pertmissions and i try to do the repair
    database thing and it's still not woeking. am i the only person having this or is it an overall
    trap17 issue and how do i fix it.....
  6. The Only Reason I Choose Ms Sql Server Rather Than Mysql
    (0)
    The only reason i choose ms sql server rather than mysql is, MS SQL has more security
    features!! MySQL is lacking a lot in my opinions - Lack in wide char, like nvarchar, I
    developed some application to support chinese letter, and dont know how to build one in mysql - Lack
    in t-sql syntax, like query in query is not fully supported - Does not have today SQL features like
    BI support (today really required) And compare MS SQL to MySQL, the only reason why mysql is
    favourable is - it is free! Dont u guys agree?....
  7. Need Advice On Setting Up Mysql Database.
    I have a huge amount of daily data updates to be inserted. (4)
    First of all, to get the idea of what I am trying to achieve here, please have a look at my
    idea thread, entitled Idea For Using A Cron Job To Grab Daily Travian Map.sql Updates . This gives
    a prelude to the project, what it is for, what it is supposed to do, etc. Now, what I need is
    specific advice on setting up the mySQL database(s) to implement this idea. There is a useful FAQ
    file for how to make use of the map.sql data located on the help.travian.com website, which also
    gives an example of the CREATE TABLE instruction that matches the data in the map.sql fi....
  8. Mysql Db Is Down Getting Following Error
    (2)
    My Mysql is Down can I get some help please? Appreciate it. Patrick Domain: patrickcurl.com Error:
    phpMyAdmin - Error #2002 - The server is not responding (or the local MySQL server's socket is
    not correctly configured)....
  9. Help! Mk1 Conversion To Kar Format
    midi karaoke (2)
    i stumbled upon my old stash of KAR format music (900+) and since it's raining much these days,
    i think it would be safe for me to be belting out and exercising my vocal chords (the heavy rain
    drowns my singing voice, so no worries from neighbors /tongue.gif" style="vertical-align:middle"
    emoid=":P" border="0" alt="tongue.gif" />). and to update my music collection with the more recent
    tunes, i have come to download MK1 files. sure, no problem, i can play them on my PC. but i began
    transferring my old KAR files to my mobile phone too, and MK1 is not supported by my....
  10. How To Implement A Date Picker On A Web Page
    (0)
    Some pages may need users to input date values. It would be nice if the users just need to click and
    pick and done. This way we may also eliminate the possible input errors. Below is the code I used to
    implement this. You may want to save it as datepicker.js for other web pages to use. I also attached
    3 files for you to download. All you need to do is unzip the 3 files to a directory under any web
    server and start trying it. If you are using jsp, you can refer to the submited field by adding
    something like request.getParameter("date1") to your page. If you're using....
  11. Changing Hosts?
    (1)
    I have a qupis account with an alpha package And... I found this new hosting site 000webhost And was
    wondering How do I cancel my qupis hosting and change to it....
  12. It Went Well For A While
    MySQL problem back in all its glory. (5)
    Some time ago I had a stubborn problem when trying to access one of the interactive pages on my
    website and getting the following error: QUOTE Warning: fopen() : open_basedir restriction in
    effect. File(include/errors.xml) is not within the allowed path(s):
    (/home/mrdee:/usr/lib/php:/usr/local/lib/php:/tmp) in
    /home/mrdee/public_html/admin/include/commonfunctions.php on line 682 Warning:
    fopen(include/errors.xml) : failed to open stream: Operation not permitted in
    /home/mrdee/public_html/admin/include/commonfunctions.php on line 682 Cannot open XML data file:
    incl....
  13. Question About Changing Domain Names.
    (8)
    Hey guys how's it going! I just had a quick question about changing domain names. My domain
    now is fearclan.trap17.com, and I wanted to change it to fearclan.org. How should I do it? Do I use
    the credit system and it will give me my own domain for free? Or do I have to buy a domain name from
    godaddy or something and then change it? I really need an answer for this as soon as possible.
    Thank you so much guys! /laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0"
    alt="laugh.gif" />....
  14. Mysql, Php, Apache Downloads And Setup Was A Nightmare
    Mysql, PHP, Apache (10)
    Mysql, PHP, Apache downloads were easy enough. Then came the setup process. This seemed to be an
    endless mess of going back and forth trying to get the programs to work together properly. Finaly I
    got them working after about 48 hours. There are great tutorials on the setup process, but only one
    or two actualy were easy enough for me to understand. I would like to see if I was the only one who
    had issues with this setup. Are there easier ways to setup the three?....
  15. Mp3
    audio format (1)
    I know, everybody heard for this audio format, but I am interested what is the difference between
    mp3 and mp3pro and lame mp3. I just can't see the difference between those mp3 audio formats.
    And another thing is there any difference between stereo sound and joint stereo sound coded in one
    of these mp3 audio formats. I know that mono has just 1 channel and stereo has 2 channels, so I am
    asking what is joint stereo. How many channels are there? I would be very appreciate to someone who
    knows any difference. Regards.....
  16. How Do I Change The Default Windows Font Size?
    Without changing DPI, of course. (4)
    I know there's an option in Ubuntu to change all the font sizes of the general system, the
    windows, and etc. Now I'm trying to do this in Windows. I've changed everything about
    the windows except for the general system size. How do I do this?....
  17. Online Date Scams
    people living fake lives... (5)
    a few years ago i logged into my msn and saw this girl in my contacts list. i dont remember if she
    added me or i added her, but she was there. and when i opened the conversation window to check out
    who it was, i saw her display picture... this beautiful girl! i didnt care how she got there, i
    just wanted to meet her! so we started talking and we became very close friends. she supposedly
    had left the city and was living somewhere else, far away, so we never could meet in person. we
    talked for over 6 months. around the year of chatting, we fell in love for each oth....
  18. Changing Legal Age For Driving
    (43)
    Now this is a good debate I think as it's something I'm not happy with as I have haven't
    passed yet. I first started having driving lesson at 17 and I didn't fully understand that I
    would have to take quite a few as I have learning disabilities and I quit them. As for my brother
    he has been taking them for a couple of months now bu the thing that has pissed him off quite a bit
    is that they are supposedly chnaging the age of when a newbie can learn how to drive and that will
    include even when they have passed. They are supposed to be poutting the age of ....
  19. Wmp (windows Media Photo) - The New Image File Format From Microsoft
    windows media photo WMP - could replace JPGs and GIFs? (33)
    Microsoft have decided to come up with a new image format to add to the common JPGs, GIFs and PNGs
    of today. It is to be called Windows Media Photo format or WMP for short. It is said to
    "Surpass the limitations of existing file formats" and here is what it'll offer: Numerous
    colour formats for printing and displaying High-quality lossy or even lossless compression
    Really efficient decoding for numerous resolutions For more features, visit
    http://www.microsoft.com/whdc/xps/wmphoto.mspx Presumeably, the JPEG2000 format or JP2 was
    ....
  20. My First Date With A Girl!
    oh ! My God ! (25)
    Buddies , here i am just sharing my FIRST VERY BAD DATE WITH A GIRL ! Its so happened that i was
    just a very new user for internet ! I was very fond of chatting. My one of friend just gave me a
    email address of a girl ! I just add her email address ! one day i was just checking my
    email , then the owner of that ID i mean she online and just send me message . I just start chatting
    with her... so it was a way of very good spending my time.. SO start chatting daily , so it became a
    part of my day... We were in the same city ... One day while just chatting sh....
  21. Muslims Not Allowed To Date
    having sex not married - discussion (9)
    Hello, Me being a Muslim means certain rules apply. I am not allowed to date! You are all
    probaly all shocked and so on! Infact it makes me laugh /laugh.gif"
    style="vertical-align:middle" emoid=":lol:" border="0" alt="laugh.gif" /> . Anyway i suppose you
    want to know why: It is mainly because of the sex thing. Having sex while not married is quite close
    in the list of major sins to killing someone. Also Muslims are commanded to not look at the opposite
    sex. So i am not allowed to look at a girl for example and check if she is 'hot'. Anyway
    just wante....
  22. Quick Question
    Is there a limit on the size of the MySQL database? (10)
    Question's in the title!....
  23. Subquery In Mysql
    (5)
    Is there anyway to make subqueries work in MySQL? I'm pretty certain someone out there knows
    how. /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> Can anyone help?
    CODE Select * from ITEMS where ID="Select Max(ID) from ORDERS"; This works
    for MSAccess and SQL Server but why not in MySQL? I'll be writing some reports and I've
    shifted database from MSAccess to MySQL. Help! Thanks.....
  24. Ie Table Width In A Div Tag
    Table expands past screen at 100% (5)
    Hey everyone. I have been designing websites for a long time but i have recently decided to tryout
    the DIV layout technique instead of just using good old tables. However, this is the biggest problem
    i have come across. So I have a page where i need to have a table to display a whole bunch of
    details on armor in a game since the site is for players of final fantasy. However, when i do
    width="100%" so that the table expands the whole way to the side of the div so it looks the best it
    now will go past the edge and off the screen at 100%. Below is most of the code. Please h....
  25. Mysql Database Size
    related to the free database space (7)
    hi all! this is my first post /biggrin.gif' border='0' style='vertical-align:middle'
    alt='biggrin.gif' /> and i have a doubt, how much mysql space i am allowed to use... i mean how
    much is available for my free account....
  26. Changing A Gmail Password
    how do u do it? (10)
    hi i have a gmail account well a couple of them and i know that someone has been getting on my
    account and screwing with it however i dont know how im supposed to get on and change my password.
    i've tried even getting them to send me information and what not when i forget my password but
    all the same i can never get to a point where i can change it and it kinda is making me upset. my ex
    gets on my account and yells at my friends telling them that i've changed and that i dont want
    anything to do with them and thats wrong i love my friends. anywayz if you know how ....
  27. Import From Excel File Into Mysql Database
    (11)
    Has anyone tried using the excel import function that comes with phpmyadmin
    http://www.phpmyadmin.net/home_page/ - it does not require any additional plug-ins or scripts and
    is fairly straightforward to use. In phpmyadmin, if you click on the database table which you wish
    to import the data to , there is a link on the bottom left corner which says "insert data from a
    text file into the table" - although it says text file it still can be used to import an excel file.
    When you click on this link you will be taken to a page where you will be asked for the file name
    (the....
  28. Increment A Mysql Column
    how to increment a MySQL column one unit (7)
    Hi, I have a column in a MySQL table which contains a counter of the views of the object described
    by this table. I would like to increment this value by one everytime the object is viewed. Obviously
    came into my mind the possibility of retrieving the value of this field, store it in a variable
    increment this value by one and perform an UPDATE query again with this new value. My question is if
    there is a MySQL option to update the field with its actual value plus an unit increment. I hope you
    understand the issue.....
  29. Complete Login System
    With PHP + MYSQL (57)
    Its an complete login sistem made and tested by me and I think itwill be very usefull for people who
    are tryn to learn PHP. First, let's make register.php: CODE <?
    include("conn.php"); // create a file with all the database connections
    if($do_register){ // if the submit button were clicked if((!$name)
    || (!$email) || (!$age) || (!$login) ||
    (!$password) || (!$password2)){ print "You can't let
    any fields in blank....
  30. Mysql Database Setup : Setting Up Mysql Database
    Guide to use MySQL database in your site (6)
    A SMALL INTRODUCTION TO DATABASE ============================= I have seen that many members have
    problems with Database. Here is a small INFO which should give you the IDEA. mySQL is a DATABASE
    server. You can access it using the link in Cpanel. Cpanel can be accessed by
    "www.YOUR-SITE.com/Cpanel" There you have 4 Main Options :- 1> CREATE A DATABASE 2> CREATE A USER
    3> ADD USER TO DATABASE 4> PHPMYADMIN CREATE : IT ALLOWS YOU TO CREATE A DATABASE CREATE USER
    : IT ALLOWS YOU TO CREATE A USER. USING THIS, YOU CAN ACCESS THE DATABASE. A DATABASE CANNOT BE....

    1. Looking for mysql, changing, date, format, bit, changi, ng, date, format, table

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for mysql, changing, date, format, bit, changi, ng, date, format, table

*MORE FROM TRAP17.COM*
Similar
Firefox And Ie: Table Layouts Look Different In Us! - A Discussion on Why These Major Browsers Display Different Table Layou
Mysql Hacks
Changing Isps - A unique view into the lives of Statesmen and RadioChick
Creating A Php Login System Using Mysql - I need help in creating a login system, what I want is a login system
Mysql Database Not Working
The Only Reason I Choose Ms Sql Server Rather Than Mysql
Need Advice On Setting Up Mysql Database. - I have a huge amount of daily data updates to be inserted.
Mysql Db Is Down Getting Following Error
Help! Mk1 Conversion To Kar Format - midi karaoke
How To Implement A Date Picker On A Web Page
Changing Hosts?
It Went Well For A While - MySQL problem back in all its glory.
Question About Changing Domain Names.
Mysql, Php, Apache Downloads And Setup Was A Nightmare - Mysql, PHP, Apache
Mp3 - audio format
How Do I Change The Default Windows Font Size? - Without changing DPI, of course.
Online Date Scams - people living fake lives...
Changing Legal Age For Driving
Wmp (windows Media Photo) - The New Image File Format From Microsoft - windows media photo WMP - could replace JPGs and GIFs?
My First Date With A Girl! - oh ! My God !
Muslims Not Allowed To Date - having sex not married - discussion
Quick Question - Is there a limit on the size of the MySQL database?
Subquery In Mysql
Ie Table Width In A Div Tag - Table expands past screen at 100%
Mysql Database Size - related to the free database space
Changing A Gmail Password - how do u do it?
Import From Excel File Into Mysql Database
Increment A Mysql Column - how to increment a MySQL column one unit
Complete Login System - With PHP + MYSQL
Mysql Database Setup : Setting Up Mysql Database - Guide to use MySQL database in your site
advertisement



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



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE