date comparision in javascript with asp.net
-
hi expert, i want to campare two date in specific situation ex. todate and fromdate i enter the todate =02/10/2009 and from date is =03/10/2009 the above example show to you the from date is greater than todate if fromdate is not greater than todate i hope you understand my querry Please reply i wait.
-
hi expert, i want to campare two date in specific situation ex. todate and fromdate i enter the todate =02/10/2009 and from date is =03/10/2009 the above example show to you the from date is greater than todate if fromdate is not greater than todate i hope you understand my querry Please reply i wait.
[Message Deleted]
-
[Message Deleted]
Parwej Ahamad wrote:
Console.WriteLine
Console.WriteLine in ASP.Net :omg:
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
hi expert, i want to campare two date in specific situation ex. todate and fromdate i enter the todate =02/10/2009 and from date is =03/10/2009 the above example show to you the from date is greater than todate if fromdate is not greater than todate i hope you understand my querry Please reply i wait.
paya1pa wrote:
i hope you understand my querry
Not exactly, but you may try somethig like this with the Date [^]object in javascript:
var toDate = new Date('02/10/2009');
var fromDate = new Date('03/10/2009');if(fromDate > toDate)
alert('From date is greater...');Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
paya1pa wrote:
i hope you understand my querry
Not exactly, but you may try somethig like this with the Date [^]object in javascript:
var toDate = new Date('02/10/2009');
var fromDate = new Date('03/10/2009');if(fromDate > toDate)
alert('From date is greater...');Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
Manas Bhardwaj wrote:
var toDate = new Date('02/10/2009'); var fromDate = new Date('03/10/2009');
But This means
toDate = 10th Feb 2009
fromDate = 10th March 2009So it is better to use
setFullYear(year,month -1, day)
like this:var toDate=new Date();
toDate.setFullYear(2009,9,2); // Represents 2nd October 2009.:)
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
Parwej Ahamad wrote:
Console.WriteLine
Console.WriteLine in ASP.Net :omg:
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
It was my mistake. Thought he is asking in asp.net and did't read his subject.
Parwej Ahamad ahamad.parwej@gmail.com
-
It was my mistake. Thought he is asking in asp.net and did't read his subject.
Parwej Ahamad ahamad.parwej@gmail.com
Parwej Ahamad wrote:
It was my mistake
Things happen ;)
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.