Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP WITH CFINPUT

Status
Not open for further replies.

jjmew

Programmer
Aug 20, 2002
34
0
0
US
I am using the CFINPUT tag to add a date to my database, the date format in my table is YYYY-MM-DD, and cfinput just validates this formats MM-DD-YYYY and DD-MM-YYYY. What I can do to make sure that the user is entering the right format? please help me
 
To ensure proper format entry seperate the form feild entry into three seperate feilds:

Make a form that allows them to enter in 2 digits for the month and day.. and 4 for the year:

Code:
Please enter in the:
month: xx     day: xx     year: xxxx

Then put it together in the format you want just before you send it into the database:

<CFSET NewDate = &quot;#FORM.year#/#FORM.month#/#FORM.day#&quot;>
David McIntosh

Let me know if this post helped you...
Please click below: &quot;This Post was Helpful&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top