470,602 Members | 1,472 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,602 developers. It's quick & easy.

Get Minimum and Maximum date

Hi All,

i am deep trouble.so,please help me how to get minimum and maximum
dates for particular Month and Year.Any kind of help will help.

for ex: im passing : March 2006

Minimum Date - 01/March/2006
Maximum Date - 31/March/2006

my code:

public sub MinMaxdate(ByVal MonInt as integer,ByVal YeaInt as integer)
Dim MinInt as integer
Dim MaxInt as integer

msgbox "Minimum Date " & "MinInt" & " Of " & MonInt & "/" & YeaInt
msgbox "Maximum Date " & "MaxInt" & " Of " & MonInt & "/" & YeaInt

end sub

With Regards,
IT SolutionsFree

Mar 10 '06 #1
1 7422

itsolutionsf...@gmail.com wrote:
Hi All,

i am deep trouble.so,please help me how to get minimum and maximum
dates for particular Month and Year.Any kind of help will help.

for ex: im passing : March 2006

Minimum Date - 01/March/2006
Maximum Date - 31/March/2006


Dim m as integer = 3 ' month
dim y as integer = 2006 ' year

Dim FirstDate As Date = New DateTime(y, m, 1)
Dim LastDate As Date = FirstDate.AddMonths(1).AddDays(-1)

--
Larry Lard
Replies to group please

Mar 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Lobang Trader | last post: by
1 post views Thread by Stefan Franke | last post: by
3 posts views Thread by Harry_Crow | last post: by
3 posts views Thread by Frank Rizzo | last post: by
3 posts views Thread by manxie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.