?
Solved

Validate Date CFInput

Posted on 2003-12-04
3
Medium Priority
?
638 Views
Last Modified: 2013-12-24
<CFINPUT NAME="ListingDate" VALUE="#Evaluate('invest.ListingDate')#" TYPE=text SIZE="20" REQUIRED="no" MESSAGE="Check Input" VALIDATE="date">

The above code is from my update(edit) page. What i am doing is showing in the input field the value from my database.

The problem I am encountering:

The date returned is in this format:
2003-09-17 00:00:00.0

I want to format my variable, to show the date in this format:

MM/DD/YY


in my form, the default returned date returns an error after i submit the form, stating it is not in the correct format VALIDATE="date"

So how can i preformat:
"#Evaluate('invest.ListingDate')#"
0
Comment
Question by:zakirdavis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
anandkp earned 2000 total points
ID: 9880048
<CFINPUT NAME="ListingDate" VALUE="#DateFormat(Evaluate('invest.ListingDate'),'mm/dd/yy')#" TYPE=text SIZE="20" REQUIRED="no" MESSAGE="Check Input" VALIDATE="date">

hth

K'Rgds
Anand
0
 

Author Comment

by:zakirdavis
ID: 9880512
Once again Anandkp, I appreciate your time.
0
 
LVL 17

Expert Comment

by:anandkp
ID: 9880540
My pleasure :)
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
What You Need to Know when Searching for a Webhost Provider
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month8 days, 15 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question