By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,780 Members | 1,549 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,780 IT Pros & Developers. It's quick & easy.

Need a help about present date

P: 29
Hi experts
gud evenin
i am having a small doubt
that is i have to display the present date in a text box
by using scripting
and that should be refreshed day after day
i mean today is 28 th so it should display 28/06/2007
and
when i run the application tomorrow
then the date in the text box should be 29/06/2007 by default.
Jun 28 '07 #1
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
See Javascript Date object.
Expand|Select|Wrap|Line Numbers
  1. var today = new Date();
will give you today's date. Then you can use the getDate(), getMonth() and getFullYear() methods to display the date how you want. See the full reference.
Jun 28 '07 #2

P: 29
Thanks alot
for giving me the necessary guidance acoder
have a nic day
Jun 28 '07 #3

acoder
Expert Mod 15k+
P: 16,027
Thanks alot
for giving me the necessary guidance acoder
You're welcome.
have a nic day
And you too.
Jun 29 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.