SunQuest
 
           General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 10th, 2003, 02:39 AM
digital102 digital102 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 15 digital102 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Date question

I am trying to add a date to a mysql database from a form. However I do not want to limit the user to entering the date as follows (YYYYMMDD). I would like the user to be able to enter the date in as (MM-DD-YYYY). If anyone can help me with this that would be great.

Thanks in advance for your help and time!!!

Reply With Quote
  #2  
Old June 10th, 2003, 03:44 AM
laidbak laidbak is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Location: In Tha IE -- San Bernardino COUNTY
Posts: 788 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 2 sec
Reputation Power: 7
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via MSN to laidbak Send a message via Yahoo to laidbak
This is a tough one.
Just think about the issues you are going to face when trying to figure out what this means:

01-02-2003

Is that January 2nd?
Is that February 1st?

I have a couple suggestions,
Why not have the date entered by a date selection drop down:

Month - Day - Year
dropdowns

I wrote a class that eases this... and there are many free ones as well.

You could also use a javascript calendar date picker.
There are lots of nice ones, just use google to find them.

My last suggestion is if you really want to have them type this all out manually, why not have dynamic form elements.

If they click a box they can activate the YYYYMMDD formate, or another box activates the MM-DD-YYYY format.

Now you can parse these effectively.
Try not to make things too hard on yourself. Its not worth it.
__________________
__________________________________________________ _
Wil Moore III, MCP | Integrations Specialist | Senior Consultant
Are You Listed...? | DigitallySmooth Inc.

Reply With Quote
  #3  
Old June 10th, 2003, 05:47 AM
digital102 digital102 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 15 digital102 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm not sure what you mean as far as a class file to handle drop downs for the date. I have been trying to figure it out, but have had no luck. Any assistance would be great!!!

Thanks.

Reply With Quote
  #4  
Old June 10th, 2003, 02:48 PM
CHornJr's Avatar
CHornJr CHornJr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: New York City
Posts: 233 CHornJr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 50 m 19 sec
Reputation Power: 6
Send a message via AIM to CHornJr Send a message via MSN to CHornJr Send a message via Yahoo to CHornJr
I would create a seperate input on the form for month, date and year. In my php code I would join the variables together to get them in the MySQL format
__________________
CHornJr
"One day I'll know what I am doing"
My Blog
Suanhacky Lodge #49
Rebel Squadrons

Reply With Quote
  #5  
Old June 10th, 2003, 06:05 PM
laidbak laidbak is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Location: In Tha IE -- San Bernardino COUNTY
Posts: 788 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 2 sec
Reputation Power: 7
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via MSN to laidbak Send a message via Yahoo to laidbak
Quote:
Originally posted by digital102
I'm not sure what you mean as far as a class file to handle drop downs for the date. I have been trying to figure it out, but have had no luck. Any assistance would be great!!!

Thanks.


Check out this post:

http://www.devarticles.com/forum/sh...s=&postid=16783

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Date question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway