Previous Week's, Mondays Date Function

I need a simple function for returning the previous weeks, Monday's date?  Any help would be greatly appreciated!!!!
tbaseflugAsked:
Who is Participating?
 
tbaseflugAuthor Commented:
Thanks -

Tried the following, but get "12:00:00 AM" resturned in place of an actual date.

    Public Shared Function GetLastMondayDate() As Date

        DateAdd(DateInterval.Day, 1 - DatePart(DateInterval.Weekday, Date.Today, vbMonday), Date.Today)

    End Function
0
 
flavoConnect With a Mentor Commented:
You forgot to return the value

    Public Shared Function GetLastMondayDate() As Date

        Return DateAdd(DateInterval.Day, 1 - DatePart(DateInterval.Weekday, Date.Today, vbMonday), Date.Today)

    End Function
0
 
flavoCommented:
Thanks!

Good luck with the rest of your project!

Dave
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.