Solved

Validate Date CFInput

Posted on 2003-12-04
3
635 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

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…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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