Solved

Validate Date CFInput

Posted on 2003-12-04
3
630 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
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
anandkp earned 500 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now