PC Review


Reply
Thread Tools Rate Thread

need a slicker way

 
 
mcnews
Guest
Posts: n/a
 
      9th Feb 2012
to do this:

....
ElseIf (Day(Date) > 12 And Month(Date) = 12 And Day(Date) < 18 And Month(Date) = 12) Then
Week = "49"
ElseIf (Day(Date) > 19 And Month(Date) = 12 And Day(Date) < 25 And Month(Date) = 12) Then
Week = "50"
ElseIf (Day(Date) > 26 And Month(Date) = 12 Or Day(Date) < 1 And Month(Date) = 1) Then
Week = "51"
ElseIf (Day(Date) > 2 And Month(Date) = 1 And Day(Date) < 8 And Month(Date) = 1) Then
Week = "52"
ElseIf (Day(Date) > 9 And Month(Date) = 1 And Day(Date) < 16 And Month(Date) = 1) Then
Week = "1"
ElseIf (Day(Date) > 16 And Month(Date) = 1 And Day(Date) < 23 And Month(Date) = 1) Then
Week = "2"
ElseIf (Day(Date) > 23 And Month(Date) = 1 Or Day(Date) < 30 And Month(Date) = 1) Then
Week = "3"
....
 
Reply With Quote
 
 
 
 
mcnews
Guest
Posts: n/a
 
      9th Feb 2012
Public Function FluWeek(ByVal sDate As Date) As String
Dim x As Integer
x = Int((CDate(sDate) - CDate("10/23/2011")) / 7) + 42
If x > 52 Then
x = x - 52
End If
FluWeek = Trim(Str(x))
End Function
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone else have IE7 under Vista crash way, way (and WAY) more often than under XP? Keith Patrick Windows Vista General Discussion 13 30th May 2007 09:52 PM
This way, that way, or some other way (new computer advise) extrude-o_matic General 19 8th Nov 2005 05:15 PM
Re: is there any way a modem(56k & cell phone 230k modem) can be speed up and any way to speed a computer up? Adam Turner Windows XP General 0 7th Apr 2004 09:17 PM
RE: is there any way a modem(56k & cell phone 230k modem) can be speed up and any way to speed a computer up? =?Utf-8?B?Qnl0ZQ==?= Windows XP General 0 7th Apr 2004 08:31 PM
network will only work at 10mb one way, but 100 the other way =?Utf-8?B?Zmd1aWhlbg==?= Windows XP Networking 0 30th Dec 2003 09:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:52 AM.