Assgining current date to Date field

S

shikha

Hi,

I have a date field in the form, and I want the value for that field to be
defaulted to today's date, similarly I have time field, and I want the value
for the time field to be defaulted to current time.

I am not sure how to do it, any help will be greatly appreciated
 
M

Mike Mueller

Is it necessary for the client to fill in date and time? If
not then the form handler can add that information for you

: Hi,
:
: I have a date field in the form, and I want the value for
that field to be
: defaulted to today's date, similarly I have time field,
and I want the value
: for the time field to be defaulted to current time.
:
: I am not sure how to do it, any help will be greatly
appreciated
 
S

shikha

It is not necessary...but if we do the query for the data, then under results
I do want to see the time & date form was filled. Will I be able to include
time stamp from Form Handler into results????
 
M

Mike Mueller

It sounds like this is going into a database, so yes, you
can pull the date time info from there

: It is not necessary...but if we do the query for the data,
then under results
: I do want to see the time & date form was filled. Will I
be able to include
: time stamp from Form Handler into results????
:
: "Mike Mueller" wrote:
:
: > Is it necessary for the client to fill in date and time?
If
: > not then the form handler can add that information for
you
: >
message
: >
: > : Hi,
: > :
: > : I have a date field in the form, and I want the value
for
: > that field to be
: > : defaulted to today's date, similarly I have time
field,
: > and I want the value
: > : for the time field to be defaulted to current time.
: > :
: > : I am not sure how to do it, any help will be greatly
: > appreciated
: >
: >
: >
 
S

shikha

Yes Mike, it is going to Access Database. In that case I can pull the
timestamp into the results page, when I am querying the data... That solves
the problem...thank you :)
 
A

Andrew Murray

If the form is on a Windows Server

you can use <% =now()%> to put the time on the form and <% =today() %>
displays the date only.

as in <input type="text" name="date" value="<% =now() %>">

and similar for the =today().

Otherwise you can use javascript to do this, but I'm unsure of the syntax
for that.
 
Top