By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,646 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,646 IT Pros & Developers. It's quick & easy.

Find the first day of the month..?

P: 1
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
Share this Question
Share on Google+
1 Reply


100+
P: 267
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.