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

Inserting today's date into hidden field 1

Status
Not open for further replies.

spencern

Programmer
Dec 20, 2001
78
0
0
US
Another hidden field question:
How can I retrieve the current date in the form of 1/13/02, and place it into a hidden field. I tried some code from the internet, but it just gave me an error message.
Thanks,
Spencer
 
Hey Spencer,

Sounds like you are getting things in order there in decent shape -

With the insert date. I need to look up to verify - but I have to run shortly.

Have you tried making default value in your database field be =now()

?

I think that will auto put in the date - just format it to short date format if that is what you want.

"If you feel a post has been helpful to you, click on the link at the bottom of their post to cast a vote for "TipMaster Of The Week". You don't need to be the one who asked the question to vote"

Stuart
 
The easiest way is simply:

<input type=&quot;hidden&quot; name=&quot;date&quot; value=&quot;<%=time%> <%=date%>&quot;>

...to give you the time and date. Not the most efficient way of writing it, but the easiest to adapt in your situ.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top