473,394 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Adding 6 months to the issue date

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.VisaExpireDat e, '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
Jul 20 '05 #1
2 2464
sa**********@yahoo.com (sandy) writes:
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
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
JRS: In article <fb**************************@posting.google.com >, seen
in news:comp.lang.javascript, sandy <sa**********@yahoo.com> posted at
Mon, 19 Jan 2004 05:42:32 :-
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.VisaExpireDa te, '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).

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Roy Riddex | last post by:
How do I add to a date? I thought the following code would work but it doesn't like it. I'm trying to add 6 months (182 days) onto a date. Option Explicit Private Sub Form_Load() Dim Answer...
16
by: sandy | last post by:
Hi, Using Java script I am trying to create code where when you place in the start date it automatically calculates 6 months for the experations date. For example when I place 01/01/04 as the...
11
by: Bobbak | last post by:
Hello All, I have these tables (lets call it ‘EmpCalls', ‘EmpOrders', and ‘Stats') that each contain the list of EmployeeIDs, I want to be able to create a Module in which I could call in my VB...
6
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new...
1
by: RobMea | last post by:
I am trying to find a solution to the following problem. First off I'm new to Access and SQL but have a good back ground in other languages, thus at a new job this has just been dumped on me so...
14
by: gorio | last post by:
I have a MySQL/PHP based page with a number of date fields that I would like the user to be able to run a script on to update the fields and then submit them for server processing. All my...
1
by: Dan | last post by:
Hi I've got a quandry - I have a detailed database that handles advert orders between a design agency and printers / magazines etc. I want to add up the total spent by the client and put the...
4
by: MCLR | last post by:
Good day to all: I found your website a couple of days ago as I was searching for resources that can help within my particular problem in writing a script for an Access Query. The issue is to...
2
by: dympna | last post by:
Hi can anyone suggest a fix for this... as I am a novice in access. I have created a training table with the following fields Employee Name - joe Training Received - Fork lift Date Received...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.