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

Inserting current date and time into a asp page 1

Status
Not open for further replies.

hallm

Programmer
Jun 11, 2000
159
US
I have a news submittion page that has a form block for the current date (must be in short format, ex. 07/13/00) and the current time (must be in short format also, ex 9:56pm).&nbsp;&nbsp;How can I get that in the asp page?&nbsp;&nbsp;I want to insert into a form as the default value like below.<br><br><br>&lt;input type=&quot;text&quot; name=&quot;date&quot; size=&quot;24&quot; value=&quot;7/13/00&quot;&gt;
 
Do you want it to update itself when the person is viewing the page <br><br>&nbsp;the vbscript function of Now() will return you the server date and format<br>&nbsp;can then be changed<br><br>&nbsp;regards <p>Unicorn11<br><a href=mailto:webmaster@tripmedia.com>webmaster@tripmedia.com</a><br><a href= > </a><br>Hi there it all likeminded fellows!!!!!!
 
hallm:<br>If it data entry form then you can give help for sp. format next to your input field.<br><br>Anand
 
hallm,<br>other functions that might be of some help are <br>DateValue(Now()) -- returns only the date<br>TimeValue(Now()) -- returns only the time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top