I don't know where to start so I just got to ask from the experts :). From my MySQL (database) I got a date formatted mm-dd-yyyy (i.e. 01/01/2010), now from my php page there are 3 dropdown/list menus which are for [Month]-[Day]-[Year] and a [TextField] then a [Submit Button]. When I click the [Submit Button] I got to retrieve the date then it will be shown in my texfield. Now the textfield having the value of the date = 01/01/2010 will be the one passing the values on my dropdowns {[Month = January] - [Day = 01] - [Year = 2010]} I just needed the help to how will I start programming as well the design for my database, do I get to have different tables for the parts of the date or what? Thank You for your help. :)
ekseks
-2
Junior Poster in Training
Recommended Answers
Jump to PostFormatting Dates and Times
DATE_FORMAT(date, format) and TIME_FORMAT assist in the representation of dates and times in formats other than the MySQL default format. Three examples illustrate the syntax:
SELECT DATE_FORMAT('2005-12-31', '%M %d %Y')
December 31 2005SELECT DATE_FORMAT('2005-12-31', '%D of %M')
31st of DecemberSELECT …
Jump to Posti thing change date format here. i dont know it works. try once.
$("#datepick").datepicker({ dateFormat: 'yy-m-d' }); });
Jump to Postyes, use explode fuction , slipt the date and display the fields . see this link
Jump to Post$disdate=explode("/","07/06/2010"); if($disdate[0]==07) { $month="july"; } $day=$disdate[1]; $year=$disdate[2];
put if condition for every month.
display $day,$month,$year where you want.
Jump to PostHi ekseks,
The date format (in MySQL) stores the date as yyyy-mm-dd which is the standard format for dates. You could change the order of the date before you display it (after you get it from the database) to get it as mm-dd-yyyy by using the explode function.
…
All 20 Replies
rch1231
169
Posting Shark
ekseks
-2
Junior Poster in Training
ekseks
-2
Junior Poster in Training
niths
-1
Posting Whiz in Training
ekseks
-2
Junior Poster in Training
niths
-1
Posting Whiz in Training
muralibobby2015
17
Posting Pro
ekseks
-2
Junior Poster in Training
raju_boini525
0
Junior Poster in Training
ekseks
-2
Junior Poster in Training
raju_boini525
0
Junior Poster in Training
ekseks
-2
Junior Poster in Training
ekseks
-2
Junior Poster in Training

Zagga
ekseks
-2
Junior Poster in Training

Zagga
ekseks
-2
Junior Poster in Training

Zagga
ekseks
-2
Junior Poster in Training

Zagga
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.