Adding 6 months to the issue date

S

sandy

Hello,
I am trying to automate a date. When typing in the issue date I
want it to automatically calculate 6 months fronm the issue date and
give me the Expiration date. Following is code that I am using:

<td>Visa Issued Date:</td>
<td><input name="visaIssueDate" type="text" size="8"
maxlength="8" value="#DateFormat(get_NamesContacts.VisaIssueDate,
'mm/dd/yy')#" onBlur="checkDate(this)"></td>
<td>Expiration Date:</td>
<td><input name="visaExpireDate" type="text"
id="visaExpireDate" size="8" maxlength="8"
value="#DateFormat(get_NamesContacts.VisaExpireDate, 'mm/dd/yy')#"
onBlur="checkDate(this)"></td>
</tr>

I have received feedback regarding what coding to use but it does not
seem to work. I would appreciate it if any one could help.

Thank you
Sandy
 
D

Dr John Stockton

JRS: In article <[email protected]>, seen
I am trying to automate a date. When typing in the issue date I
want it to automatically calculate 6 months fronm the issue date and
give me the Expiration date. Following is code that I am using:

<td>Visa Issued Date:</td>
<td><input name="visaIssueDate" type="text" size="8"
maxlength="8" value="#DateFormat(get_NamesContacts.VisaIssueDate,
'mm/dd/yy')#" onBlur="checkDate(this)"></td>
<td>Expiration Date:</td>
<td><input name="visaExpireDate" type="text"
id="visaExpireDate" size="8" maxlength="8"
value="#DateFormat(get_NamesContacts.VisaExpireDate, 'mm/dd/yy')#"
onBlur="checkDate(this)"></td>
</tr>

I have received feedback regarding what coding to use but it does not
seem to work. I would appreciate it if any one could help.

Read the FAQ.

Don't let your news software wrap lines; that mars legibility. Wrap by
hand, with consistent indentation.

If you have control of the system design, change that 6 months to 182
days. Less programming, and has the advantage of going to the same day
of the week - unless you want the next day of the week, when use 183.

The matter was discussed here last week, in a thread "Add six months to
a start date". Some of the solutions given there work well, and the
others have been sufficiently criticised.

Therefore, either you have mis-explained the question, or you have mis-
implemented the solutions given, or the correct answer is not that which
you are expecting, or there is some other difficulty.

We need a clear specification of the intent, including short-month
effects, the smallest code that demonstrates your problem, the results
you get in a given case, and the results you think you should have got.
We may also need to know which browser(s) are being used, and the
version(s).
 
L

Lasse Reichstein Nielsen

I am trying to automate a date. When typing in the issue date I
want it to automatically calculate 6 months fronm the issue date and
give me the Expiration date. Following is code that I am using: ....
I have received feedback regarding what coding to use but it does not
seem to work. I would appreciate it if any one could help.

Some of the feedback you received suggested that you decide what "6
months later" is for, e.g., 31th of March or 30th of August. Just adding
six to the month number will give illegal dates (31th of September and
30th of February).

When you have decided what you want the result to be, I'm sure we
can find a way to give it to you.

(I have no idea what the "#"'s are doing in your code, or what the DateFormat function is doing).

/L
 

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

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top