Need to edge out the competition for your dream job? Train for certifications today.
Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.
Public Function Semiyear( _
ByVal datDate As Date) _
' Returns 1 if datDate falls in first semiyear of the year of datDate.
' Returns 2 if datDate falls in second semiyear of the year of datDate.
' 2007-01-06. Cactus Data ApS, CPH.
Const cintMonthsPerSemiyear As Integer = 6
Dim intSemiyear As Integer
' No specific error handling.
On Error Resume Next
intSemiyear = -Int(-Month(datDate) / cintMonthsPerSemiyear)
Semiyear = intSemiyear
Open in new window
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.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.