From Date and To Date

 

In my application i have two textboxes.One for From date and the other one 
for To date.

I need to check whether the From date is lesser than To Date..Date formats will be either
(DD-MM-YYYY) or (DD/MM/YYYY).and i have used calendar extender for selecting date

I need the script code to do this...
Thanks in advance
0
usha
3/19/2009 5:37:56 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

2 Replies
1632 Views

Similar Articles

[PageSpeed] 57

See this thread: http://forums.asp.net/t/1346328.aspx

Mohsin Naeem
"Please mark as answer if it helped you"
0
mohsinaeem
3/19/2009 5:56:24 PM

 

<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>    
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <cc1:CalendarExtender ID="TextBox1_CalendarExtender" runat="server" 
            Enabled="True" TargetControlID="TextBox1">
        </cc1:CalendarExtender>
        <br />
        <br />
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <cc1:CalendarExtender ID="TextBox2_CalendarExtender" runat="server" 
            Enabled="True" TargetControlID="TextBox2">
        </cc1:CalendarExtender>
        <asp:CompareValidator ID="CompareValidator1" runat="server" 
            ControlToCompare="TextBox1" ControlToValidate="TextBox2" 
            ErrorMessage="To date should be greater than from date" Operator="GreaterThan" 
            Type="Date">*</asp:CompareValidator>
        <br />
        <br />
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
        <br />
        <asp:Button ID="Button1" runat="server" Text="Button" />    
    </div>
    </form>
 
Chinna_sv...
0
getchinna_sv
3/21/2009 10:22:14 AM
Reply:

Similar Artilces:

Dates, Dates, Dates!
Hello all... I am in the process of building an appointment system, and I am trying to see if I can get some pointers on which way to go on this. The first version of this appointment system was very lo-tech, and it stored all of the possible dates/times in the database. Once a user booked an appointment, their information was logged to that date/time, and then that date/time would no longer show in the list of possible openings. This was great for a temporary fix, but with having to pre-populate all of the dates/times, the system would eventually have to be updated to continue on pa...

How to convert a chinese date to english date in web form?
Hi ASP.NET Proz,  I try to convert a chinese charater date (18-一月-2008) to english date (18-Jan-2008) from a web form. Is that possible?  Thanks in advance for the Proz!  * .NET Proz always make impossible to possible Try this one:   System.Globalization.CultureInfo nlCulture = new System.Globalization.CultureInfo("zh-CHT"); // Chinese Traditional DateTime date = DateTime.MinValue; DateTime.TryParseExact(chineseDateString, "dd-MMM-yyyy", nlCulture, System.Globalization.DateTimeStyles.None, out date); ...

from date to date
I am working on a form for livestock. one of the things in the form is a checkbox to let me know if they qualify or not. the second is I have a created record field entered into the database... now my question is I am doing a search on this and cant figure it out since i am new to all this...i have a query that selects the qualification checkbox (where qualify = 'true') then another query that selects the created record date... and the search is that I want to get the information in the livestock that are qualifyed (have the checkbox qualify = to 'true') between  one dat...

convert date christian date to persian date
hi, I need to convert christain date that was produced in my Sql database to persian date like" دوشنبه 21 مرداد 1378" in a datalist.Could you recommend me any function.I use VisualStudio 2005 & VB. thanks in advance Sepid Take a read of http://www.codeproject.com/KB/database/PersianDateInSQLServer.aspx or maybe a javascript route like http://www.codeproject.com/KB/gadgets/PersianDateViewerGadge.aspx Hope it helpsRegardsJeremyIf this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.That way future readers will ...

No date in Date field
I have just installed thunderbird on my system. I migrated from outlook express. All the mail that was there before shows both the date and the time in the date field. However, all mail received by thunderbird only has a time stamp, no date. How do I correct this?? Thanks, Roger _Roger Bailey_ spoke thusly on 29/08/2006 10:09 PM: > I have just installed thunderbird on my system. I migrated from outlook > express. All the mail that was there before shows both the date and the > time in the date field. However, all mail received by thunderbird only has ...

the From date should be lesser than To Date
 In my application i have two textboxes.One for From date and the other one for To date.I need to check whether the From date is lesser than To Date..Date formats will be either(DD-MM-YYYY) or (DD/MM/YYYY).and i have used calendar extender for selecting dateI need the script code to do this...Thanks in advance DateTime.Compare(t1,t2); Value Type Condition Less than zero  t1 is earlier than t2. Zero t1 is the same as t2. Greater than zero t1 is later than t2. "Object reference not set to an instance of an object" from date :(i...

compare date to a date
I have in a where clause the following statement. SELECT "sales"."sale_date", "sales"."ling_no", "sales"."course_no", "sales"."product_no", "sales"."service_no", "sales"."quantity", "sales"."amount", "payment"."amount", "payment"."payment_form" FROM "payment", "sales" WHERE ( "sales".&...

dates between date ranges
hi, i need 1 help regarding query, i have Startdate and Enddate using SELECT statement i need all the dates between these 2 dates, is it possible or i had to do it programatically, or i had insert data only please helpThanksParthvisit for some interesting articals at www.parthrawal.blogspot.comMark as Answer if it helps you  declare @temp table ( [date] datetime ) declare @startdate datetime,@enddate datetime set @startdate = getdate() -- here you can write a select stmt as "select startdate from tablename" set @enddate = getdate() + 10 -- here you can write a ...

calendar date span (date start : date end)
Hi! Can anyone help me with this? Say, I have these two textboxes. Date Start:        Date End:             What I wanted to do is to put dates on it using the calendar. My problem is I do not know what to do to keep the "Date Start" not way after the set "Date End", and for "Date End" not way before the set "Date Start".   example: Date Start: July 1, 2008              &nb...

Date() == new Date()
Ecma wise, what's the expected return from the above, true or false? I know 'Date()' called as a function returns a string, while 'new Date()' returns an object. I also know Date.toString() is getting called (SM) for 'new Date()' before the '==' equality operator is evaluated (to 'true'). What's the expected return for Date() === new Date()? Thanks for the attention! Celso Celso Aguiar wrote: > Ecma wise, what's the expected return from the above, true or false? > I know 'Date()' called as a function returns a string...

search date TO date
Hii all...haii..im still beginner in asp.net..here i want to know how to create search date until date?here is my example:- Hi, I don't see your code------------------------if an answer, mark it so. Hi yanz_shi, As mentioned, we couldn't see your example. Please check the thread after you've created it so that we can help you better. Also, for searching between two dates, you could do it like this: select * from tab where dt between date1 and date2 Thanks.David QianMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark ...

How to convert Julian date into Calendar date (VB.Net)
Hi all, I have some dates which are in Julian format and I need to convert them into calendar dates  for example if the Julian date is 1, I need to be able to convert it into 1/1/2007, If the julian date is 66 then I would need to convert it to 3/7/2007 and so on. Every year would start with 1 and end with 365365 = 12/31/2007. Is there a vb.net function or tutorial somewhere ? thanks for any help.    1) Your dates aren't in Julian format!! 2) How do you know which year you are referring to? 3) Have you tried the AddDays function of the Date/DateTim...

date field = date
i made an news table and i made and option to add and update and delete news from it i need one thing that when someone try to add news the time that he insert the news will be in teh date field of the table and dont the costumer write it   hope that u understand me Hi, did you mean you want to add a column that get current date as its value automaticly? If so, you can do the following in Access2003: 1. add a column with 'Date/Time' data time 2. In the 'Field Properties'->'General' pannel, add a 'Default Value' for it, 3. In the 'Expression Builder', double cli...

Filter for null dates, dates less than other specific date
Hi, I want to get those rows from a datawindow which has date value as null or the date value is less than some other specific date. I need to do this after the data is retrieved using filter. Its equivalent in SQL would be like my_date < TO_DATE('11/20/2007','MM/DD/YYYY') OR my_date IS NULL Please let me know how this can be achieved to filter data in datawindow. DaysAfter() and IsNull() are your friends. <prabhakar.narvekar@gmail.com> wrote in message news:8be40319-722a-4dca-bba2-9e076a41ac5f@s19g2000prg.googlegroups.com... > Hi, > I ...

Web resources about - From Date and To Date - asp.net.web-forms

‘Hateful Eight’ Costume Designer Courtney Hoffman On How Tarantino Dragged The Crew “Kicking And Screaming ...
SPOILER ALERT: This story contains details from Quentin Tarantino's The Hateful Eight , which will have a limited release on December 25. Courtney ...

Belgium: Muslim Biker Gang Members Arrested Over ISIS-Style New Year Terror Plot
Authorities in Belgium have arrested two people from the country after they were suspected of being involved in a New Year’s Eve terror plot ...

Missing Country Singer Craig Strickland's Dog Found Alive as Backroad Anthem ...
CBS News Missing Country Singer Craig Strickland's Dog Found Alive as Backroad Anthem ... E! Online Hope is found in a four-legged friend. ...

Two Islamic State operatives with ties to Paris attackers reported killed in ...
Los Angeles Times Two Islamic State operatives with ties to Paris attackers reported killed in ... Los Angeles Times Charaffe Mouadan had ...

Affluenza Teen Ethan Couch May Get Off Very Lightly…Again
Ethan Couch, who’s been dubbed by the mainstream media as the “affluenza” teen, might be getting of with yet another legal slap on the wrist. ...

Samsung is adding SmartThing hubs to its 2016 HD TVs to control connected devices
Ken Yeung / VentureBeat : Samsung is adding SmartThing hubs to its 2016 HD TVs to control connected devices — Your next Samsung HD television ...

Actor Mark Salling, “Puck” on “Glee,” Arrested On Child Pornography Charges
Former Glee star Mark Salling was arrested this morning in Los Angeles for investigation of possessing child pornography. The 33-year-old actor ...

Selena Gomez Talks Lupus & Chemotherapy: Signs She’ll Renew Romance With Justin Bieber — Sorry, Niall ...
Selena Gomez survived a tumultuous, highly-publicized breakup with Justin Bieber and rampant rumors about why she was taking a hiatus from her ...

Bengals' overtime loss in Denver complicates playoff quest
CINCINNATI (AP) — The Bengals' quest to end their long streak of playoff futility has gotten a lot tougher.

The latest big ‘Game of Thrones’ season 6 reveal is all about Bran Stark
After ending on somewhat of a cliffhanger earlier this year, the wait for the next season of Game of Thrones has been especially difficult for ...

Resources last updated: 12/30/2015 12:20:12 AM