I am facing a problem to add the days with the existing date
ex text field 1== 29/11/2006
Add day = 10 days
I am getting the output as 39 / 11 / 2006
but i need the result as == 9/12/2006 in another text box
Please help me in javascript 12 6700
I am facing a problem to add the days with the existing date
ex text field 1== 29/11/2006
Add day = 10 days
I am getting the output as 39 / 11 / 2006
but i need the result as == 9/12/2006 in another text box
Please help me in javascript
Post the code you are using that is giving the problem
I am facing a problem to add the days with the existing date
ex text field 1== 29/11/2006
Add day = 10 days
I am getting the output as 39 / 11 / 2006
but i need the result as == 9/12/2006 in another text box
Please help me in javascript
If you add 10 to 29 you get 39. Why wouldn't you expect that?
Post the code you are using that is giving the problem
Hello Gentle man,
I need the answers, i don't need the questions, If u know the answer replay
and help me sir,
Y r u wasting ur time and ur thinking power.
" I opened with smile. but, i got frestrated" Please don't do like this sir,
If any thing wrong forgive me.
If u know once again help me sir.
Any way thanks sir,
Frankline jose
If you add 10 to 29 you get 39. Why wouldn't you expect that?
Hello Gentle man,
I need the answers, i don't need the questions, If u know the answer replay
and help me sir,
Y r u wasting ur time and ur thinking power.
" I opened with smile. but, i got frestrated" Please don't do like this sir,
If any thing wrong forgive me.
If u know once again help me sir.
Any way thanks sir,
Frankline jose
Hello Gentle man,
I need the answers, i don't need the questions, If u know the answer replay
and help me sir,
Y r u wasting ur time and ur thinking power.
" I opened with smile. but, i got frestrated" Please don't do like this sir,
If any thing wrong forgive me.
If u know once again help me sir.
Any way thanks sir,
Frankline jose
The moment you post the code you have so far, you will be surprised how much help you will start getting.
one text box contain == 15/10/2006 (dd/mm/yyyy)
in next text box contain == 30 (dd ) (day only)
what will be result in another text box = 14/11/2006 (dd/mm/yyyy)
[give code for this program in javascript]
one text box contain == 15/10/2006 (dd/mm/yyyy)
in next text box contain == 30 (dd ) (day only)
what will be result in another text box = 14/11/2006 (dd/mm/yyyy)
[give code for this program in javascript]
This does not make any sense.
The sample code myDate=new Date();
myDate.setDate(myDate.getDate()+10+365)
document.write(myDate);
The out put will by 12/dec/2006
Are you trying to add dates but finding out that sometimes when you add dates the result is a date that isn't legit? Like 35/12/2006?
-
function addDays(){
-
var t1='15/10/2006' // get input value
-
var t2= '35'; // get input value
-
-
var A=t1.split('/');
-
var N= parseInt(t2)*86400000;
-
A[1]-=1;
-
var D=new Date(A[2],(A[1]),A[0]).getTime();
-
D=new Date((D+N));
-
var str= D.getDate()+'/'+(D.getMonth()+1)+'/'+D.getFullYear();
-
return str // or set a text area value= str
-
}
/*
Note- Get your values (t1,t2) from the input field values
Date() references months starting with 0 for january, 11 for december
if you don't subtract 1 from the user entered month you can get Nov 31 instead of Dec 1
This is an easier ( and internationally friendlier) way to display the date string:
var str= D.toLocaleDateString();
*/
I am trying to answer if its not too late
I am trying to answer if its not too late
It's been nearly two years, but it's never too late to answer.
It had already been answered in another thread which I've now merged with this one, but post your proposed solution anyway. Every bit of good help is appreciated by all I should think.
PS. welcome to Bytes!
Sign in to post your reply or Sign up for a free account.
Similar topics
by: marcum williams |
last post by:
Finding absolutely no documentation for updating existing projects on
a remote server using Web Setup Projects. Any help would be much
appreciated.
thanks
|
by: Raffi |
last post by:
I need to do the following:
From the main page I click a link button and open a javascript popup
window. So far so good. Now when i try to open a new popup window from
a button link in the first...
|
by: dave jackson |
last post by:
Hi,
I'm formatting fields when creating my view and would like to reuse
the existing labels.
e.g.
Create View TEST AS SELECT
AMOUNT,
CURRENCY,
DIGITS(CUSTNO) AS PADCUSTNO,
DATE(DAYNO) AS...
|
by: sunilkeswani |
last post by:
I need help with exporting data from 2 access tables, into 2 existing
spreadsheets in a single Excel file.
Currently, I am using this code:
DoCmd.TransferSpreadsheet acExport, 8, "Table1",...
|
by: Andy Bates |
last post by:
I have hopefully a simple problem in C#.
I designed a form with a listview on left, vert splitter against that, then
the remainder of the form from top to bottom: a listview, horiz splitter and...
|
by: chrislearner |
last post by:
Hi All,
I am new to this group and urgently require help from you guys!!
I have to hard code the START date and the END date to 04/01/2006 and 06/30/2006 respectively. Here's the existing sql...
|
by: ShadesOfGrey |
last post by:
Hello again. Thanks to Gord, I have this cool query that puts my
student attendance records in a calendar format in Access 2003.
PARAMETERS Text ( 255 ), IEEEDouble;
TRANSFORM...
|
by: PerumalSamy |
last post by:
Hi
I am developing a project in asp.net using vb coding.
I need to add days/weeks/months to existing date in asp.net.
Ex:
existing date : 24/10/2007
Add : 10 days or 2 weeks...
|
by: scoots987 |
last post by:
Hi all,
I have an existing table(Several actually) that I want to add a column
or two or three. I need to have, I think, at least two columns. One
for Created date and believe this is a no...
|
by: =?Utf-8?B?QnJ5YW4=?= |
last post by:
Hello group.
I have some code (given to me), but I don't know alot about ASP, so I was
hoping someone here can help. Running on Win 2008 server.
The code below will scan a folder and subfolder...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |