473,395 Members | 1,936 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,395 software developers and data experts.

calendar compare date.

i want to check if the date selected is before the today date. if yes, i wish to return a message in the label.

if (Convert.ToDateTime(Calendar1.SelectedDate.Date) = (Convert.ToDateTime(Calendar1.SelectedDate.Date)))
{
Label1.Text += "Select date after or today date";
}






another prob is my datediff don't seem to work. anyway MPAnnouncement.date_posted is a column name in my annoncement table.

SELECT MPAnnouncement.announcement, MPAnnouncement.date_posted, MPAnnouncement.subject, MPUser.user_name FROM MPAnnouncement INNER JOIN MPUser ON MPAnnouncement.user_id = MPUser.user_id WHERE (MPAnnouncement.display_to = 'Industry') OR(MPAnnouncement.display_to = 'All') OR (MPAnnouncement.display_to LIKE '%I%') AND (DATEDIFF (d,MPAnnouncement.date_posted,GETDATE())=0)



thanks
Aug 16 '07 #1
0 899

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Lumpierbritches | last post by:
I have a Calendar control (me.mycal) and a subform sbfAppointments, with child/parent links from Parent/MyCal (ActiveX) to Child/ApptDate in the subform sbfAppointments. I would like to be able...
2
by: jodyblau | last post by:
I am trying use a Calendar Control 10.0 in one of my forms. (I am using access 2002) What I want to do is have the user click a button which makes the calendar visible. Then when the user...
1
by: afr0ninja | last post by:
Hello all, and thank you in advance for your assistance. I'm pretty new to access and I'm trying to teach myself some VBA by using various bits of code I find here and there mixed with my own....
1
by: malgorzata | last post by:
i have this script that i found on internet, but i nedd to compare the dates in calendar with the ones i pick up from database oracle using jsp. and i have a proble with it, can someone help me? ...
0
by: jphelan | last post by:
After opening and clicking on the popup calendar command control button, "fdlgCal"; I click on a given date. The date is suppose to then appear in a date field next to the control. Instead, I get...
4
by: ShyGuy | last post by:
A while back I had found a link to a popup calendar that had a small button that was placed to the right of any text box. By clicking on the icon and selecting a date the text box was updated with...
3
by: thorpk | last post by:
I posted this problem earlier in the month and some one decided it was better to change the subject and ask a completely different question. I am therefore reposting. I am hoping some one can...
1
by: Iain | last post by:
Hi All I've 2 calendar controls on my web form - i need to check if Calender1 date selected is greater than Calender 2 date selected (and then display an error message) TIA iain
0
by: mathewgk80 | last post by:
HI all, I am having popup calendar Javascript code. But i dont know how it is connecting to asp.net code.. I am using asp.net,c#.net and also using 3tier architecture with master page.... I...
4
by: gubbachchi | last post by:
Hi all, Please anybody help me solve this problem. I am stuck up with this from past 2 weeks. I am developing an application where, when the user selects date from javascript datepicker and enters...
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
0
BarryA
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...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.