Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Date Of First Day of Week
Author:
Jhan Zaib Tariq
Submitted:
12/5/2003
Version:
VB6
Compatibility:
VB6
Category:
Date/Time
Views:
41373
It returns the date of first weekday of passing date.
Declarations:
'none
Code:
Private Sub Command1_Click() MsgBox DateOfFirstDayofWeek(Weekday(Date, vbSunday), Date) End Sub Private Function DateOfFirstDayofWeek(intCurrentDayofWeek As Integer, WhichDate As Date) As Date On Error GoTo error_handler DateOfFirstDayofWeek = DateAdd("D", intCurrentDayofWeek * (-1) + 1, WhichDate) Exit Function error_handler: DateOfFirstDayofWeek = Date End Function
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement