Add number to Date

P

Pankaj

Hi

I have two problems

a) I have two form fields. In one of them, a user enters the date (in
dd-mm-yyyy format, using a calendar) and in the second, he enters a
number. I have to add this number to the date and calculate the result.


b) I need to display this calculated value in a particular cell on the
form body and not inside a text box. How do I go about this

TIA
 
D

Dr J R Stockton

Wed said:
a) I have two form fields. In one of them, a user enters the date (in
dd-mm-yyyy format, using a calendar) and in the second, he enters a
number. I have to add this number to the date and calculate the result.

FAQ 3.2 .. .. A = S.split('-') ; D = new Date(A[2], A[1]-1, +A[0] + +N)

But you should validate the date : js-date4.htm
b) I need to display this calculated value in a particular cell on the
form body and not inside a text box. How do I go about this

FAQ 4.15

It's a good idea to read the newsgroup and its FAQ. See below.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top