| | |
how to find that a date exists in between two dates ?
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 34
Reputation:
Solved Threads: 0
Hi friends,
could anybody guide me , how to find that a date exists in between two dates ?
For example : 23/09/2008 -- 28/09/2008 - I'am on leave.
When a attendence is entered for the date 24/09/2008 , then i should get a msg saying, that the given date exists in the leave date.
In a leave table, i already store the above two dates and save. I will enter the attendence in the front end
could anybody guide me , how to find that a date exists in between two dates ?
For example : 23/09/2008 -- 28/09/2008 - I'am on leave.
When a attendence is entered for the date 24/09/2008 , then i should get a msg saying, that the given date exists in the leave date.
In a leave table, i already store the above two dates and save. I will enter the attendence in the front end
•
•
Join Date: Oct 2008
Posts: 32
Reputation:
Solved Threads: 4
hi,
fetch your leave start date and end date
startdate = stdt
enddate = nddt
if currentdate >= stdt AND currentdate <= nddt
{
msgbox (".....")
}
fetch your leave start date and end date
startdate = stdt
enddate = nddt
if currentdate >= stdt AND currentdate <= nddt
{
msgbox (".....")
}
•
•
Join Date: Dec 2008
Posts: 10
Reputation:
Solved Threads: 0
Put the date in a variable first and then compare them.
VB.NET Syntax (Toggle Plain Text)
Private Sub Form1_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles MyBase.Load Dim dateFrom As Date = New Date(2008, 12, 1) Dim dateTo As Date = New Date(2008, 12, 5) Dim dateAttend As Date = New Date(2008, 12, 3) If dateAttend > dateFrom And dateAttend < dateTo Then MessageBox.Show("You're are on holiday!") End If End Sub
![]() |
Similar Threads
- Device Problem (Windows 95 / 98 / Me)
- This ought to be simple - extra spaces (PHP)
- Page cannot be displayed (Web Browsers)
Other Threads in the VB.NET Forum
- Previous Thread: complete records between two dates
- Next Thread: Threads and shared data problem
| Thread Tools | Search this Thread |
.net .net2008 2008 access advanced application array basic beginner browser button buttons center click client code combo convert cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse excel exists fade filter forms function generatetags html images input intel internet listview map mobile module monitor msaccess net number objects open panel pdf picturebox picturebox2 port position print printing problem read regex remove right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter user usercontol vb vb.net vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms winsock wpf wrapingcode xml year





