Question Date Problem

arsalangodil

Member
Joined
Dec 14, 2009
Messages
6
Programming Experience
Beginner
Hi,

I want biweekly start date and biweekly end date.

For Example:

If i select date from datepicker 12/14/2009 and week start day is monday then start date should be 11/30/2009 And End Date should be 12/13/2009.

And if i select date from datepicker 12/15/2009 and week start day is monday then it should show start date 12/14/2009 not 12/1/2009 or 12/7/2009.

I m totally confused...please help..
 
Yes, in old VB6 or below, that would have been fine. But programmers who are more intelligent than me ;) have thought about all the 'tricks' we used to have to write, and have now coded them for us :-

VB.NET:
Math.Ceiling(3.4) = 4
Math.Ceiling(3.7) = 4

I think it's time you removed your Microsoft.VisualBasic reference. I know it will make writing code difficult for a while (I remember when I decided to go from VB6 to 2005 :eek: ), but you will write better code afterwards :D


{Be hAppy}

Dear IntertiaM,

How can I remove the Microsoft.VisualBasic reference.

Usually I don't add using Imports ...
 
How can I remove the Microsoft.VisualBasic reference.

Go to your Solution Explorer and click on My Project. Select the References tab from the left, and you will see "Imported Namespaces" at the bottom. Microsoft.VisualBasic will be checked. Uncheck it :)
 
{Be hAppy}


Dim MyDate As Date = DateSerial(2009, 12, 14)

Dim StartDate As Date = New Date(MyDate.Year,MyDate.Month,1)

Dim EndDate As Date = New Data(MyDate.Year,MyDate.Month,date.DaysInMonth(MyDate.Year,MyDate.Month))
 
Go to your Solution Explorer and click on My Project. Select the References tab from the left, and you will see "Imported Namespaces" at the bottom. Microsoft.VisualBasic will be checked. Uncheck it :)


I can see different references like:

System.Data
System.Drawing
System.Windows.Forms
etc

But Microsoft.VisualBasic is not available in the list.
 
Back
Top