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

Date & Time Field. 1

Status
Not open for further replies.

llldnylll

Technical User
May 21, 2003
89
Hi,

I am creating an asp form that users can fill Name, Location, Time and Date.

Is there a way that we can have the D&T fields automatically filled in? (depending on when they opened that page)
 
Thanks!

Is there a way that I can chage how it is picking up time?
I am getting this: Fri Nov 03 09:46:32 2006

How can I get it just to show date?
 
Code:
<input name="date" value="<%=Date()%>">
That will just put the date in.

[Peace][Pipe]
 
Would there be a reason why I get

Fri Nov 10 10:38:33 2006 instead of 11/10/06 ?

I am using <input name="date" value="<%=Date()%>">
 
There must be something else in your code.
Try using this instead. Put this in your head
Code:
<%
dd=datepart("dd",date())
mm=datepart("m",date())
yy=datepart("yyyy",date())
myDate=dd&"/"&mm&"/"&yy
%>
and this in your form
Code:
<input name="date" value="<%=myDate%>">

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top