Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

MySQL Date field

  • 20-11-2005 11:16pm
    #1
    Registered Users, Registered Users 2 Posts: 673 ✭✭✭


    Hey,

    Am i correct in saying that mysql has to store the date in the format 0000-00-00.

    I am using a html form to get users to input when they are holding tournament. I am currently asking them to input the date in the format yyyy-mm-dd to suit mysql. Is their a way around this.

    When i want to display this data on my site i want it in the format dd-mm-yyyy. How do i do this?

    Thanks for your help


Comments

  • Registered Users, Registered Users 2 Posts: 1,464 ✭✭✭evilhomer


    Have you tried the PHP manual???

    Manual


  • Registered Users, Registered Users 2 Posts: 673 ✭✭✭Bananna man


    I'm using one at the moment but i've skiped ahead a bit and so am a bit lost. I check what it said about the date function at www.php.net but that wasnt much use for what im asking about.


  • Closed Accounts Posts: 291 ✭✭kstanl


    Generally I'll use three select boxes side-by-side... the first is for the day (1-31) the second is for month (1-12) and the third is for year (1900-2050 or whatever the year range is). Once the user submits the form, all you need to do is insert the date as: Request("year") & "-" & Request("month") & "-" & Request("year")

    Be sure to remember to update the 'day' select box using DOM script if necessary depending on what month is selected (30 days hath September, April June and November - all the rest have 31 except for February alone! :D )


Advertisement