Just nu i M3-nätverket
Jump to content

veckor


peterbladh

Recommended Posts

Använder detta:

<%

Function VNUM_NOW()

dNow = DateSerial(Year(Now), Month(Now), Day(Now))

For i = 1 To 7

dJan1 = WeekDay(DateSerial(Year(Now), 1, i))

If dJan1 = 2 Then dFirstmon = DateSerial(Year(Now), 1, i)

Next

dJan1 = WeekDay(DateSerial(Year(Now), 1, 1))

If dJan1 = 1 Then dJan1 = 7 Else dJan1 = dJan1 - 1

If dJan1 > 4 Or dJan1 = 1 Then dDaycount = dNow + 7 - dFirstmon Else dDaycount = dNow + 14 - dFirstmon

If Fix(dDaycount / 7) = 0 Then VNUM_NOW = 53 Else VNUM_NOW = Fix(dDaycount / 7)

End Function%>

<% = VNUM_NOW%>

 

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...