?
Solved

Validate Date CFInput

Posted on 2003-12-04
3
Medium Priority
?
641 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

850 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