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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically enter date

Status
Not open for further replies.

skijohn

Technical User
Apr 10, 2001
2
US
I am attempting to automatically get today's date to be entered into a field in a form as the default value. Can anyone tell me how to do that?

Thanks!
 
<input type=&quot;text&quot; name=&quot;Date&quot; value=&quot;#DateFormat(Now(),&quot;mm/dd/yy&quot;)#&quot; size=&quot;10&quot;>

DateFormat(Now(),&quot;params&quot;) works great anytime you need to display the current date. Andrew
 
An other way to do it is the use of the CFPARAM.
Just do like this : <cfparam name=&quot;Yourdate&quot; default=&quot;#now()#&quot;>

and after : <input type=&quot;text&quot; name=&quot;inputname&quot; value=&quot;#variables.yourdate#&quot;>

you can also apply a dateformat on the variable !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top