How can i get the date of first day of the current week on Visual .Net???

infogws
infogws used Ask the Experts™
on
Hello,

Firstly, I'm sorry for my bad english, but i'm preuvian and I know a little bit of English...

I need to get the date of the first date of the current week and month for my .Net App, but i dont know how do it.

It wil be to set parameters for my MySql DB.

Thanks!

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
First Day Of Month:
Dim eFirstDay As Date = CDate("01/" & Month(Today) & "/" & Year(Today))

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'This will show you the date of the first day of the week, which is Sunday.
        Dim edate As Date = #5/20/2011#  'The date of the week you put it here
        Do While edate.DayOfWeek > 0
            edate = edate.AddDays(-1)
        Loop
        MsgBox(edate)
    End Sub

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial