467,880 Members | 1,135 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Find the first day of the month..?

hi!

can anyone help me with the following:

I'm doing a project whereby i need to find the day, (Monday, Tuesday etc.) of the first of the month when giving a date
eg. giving 15th april 2003 should return Tuesday because the 1st of April 2003 was on a tuesday (i'll settle for a number, can convert it later)

Many thanks in advance
Nov 18 '06 #1
  • viewed: 2910
Share:
1 Reply
100+
hi!

can anyone help me with the following:

I'm doing a project whereby i need to find the day, (Monday, Tuesday etc.) of the first of the month when giving a date
eg. giving 15th april 2003 should return Tuesday because the 1st of April 2003 was on a tuesday (i'll settle for a number, can convert it later)

Many thanks in advance
hi

input Date : see Weekday(Date)
output Day : see xDay

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. strDays = "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"
  3. aDay = Split(strDays, ",")
  4. wDay = Weekday(Date)
  5. xDay = aDay(wDay - 1)
  6. End Sub
  7.  
Nov 18 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by johkar | last post: by
20 posts views Thread by Laguna | last post: by
6 posts views Thread by =?Utf-8?B?UGF1bA==?= | last post: by
code green
2 posts views Thread by code green | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.