Aktuelle Kalenderwoche in den Programmiersprachen PHP, JAVA, C, C++, C#, Excel

 

VBA

Aktuelle Kalenderwoche in VBA / Visual Basic for Applications:
Function kalenderwoche(aDate As Date) As Integer
    currenttime = DateSerial(Year(aDate + (8 - WeekDay(aDate )) Mod 7 - 3), 1, 1)
    KW = (aDate - currenttime - 3 + (WeekDay(currenttime ) + 1) Mod 7) \ 7 + 1
End Function
Visual Basic for Applications kurz VBA ist eine zu Microsoft Office gehoerende Scriptsprache.