29/09/2017, 00:23
Hafta Adedi Hk.
1 2
29/09/2017, 01:04
ozanakkaya
29/09/2017, 12:41
serkan1985
Ozan bey belirttiğiniz kod mevcut haftanın yılın kaçıncı haftası olduğunu gösteriyor. Benim yapmak istediğim örnek eylül ayının 2. haftasında isem sadece "2" 3. haftasında isem "3" olarak tarihi kimlik sayarak sütuna eklemesi.
29/09/2017, 13:17
ozanakkaya
Aşağıdaki fonksiyon ile ayın kaçıncı haftası olduğunu bulabilirsiniz.
Public Function WeekInMonth(dte As Date) As Integer
Dim strMonthYear As String
Dim dteFirstMonth As Date
Dim intDaysDiff As Integer
Dim intDayFirstOfMonth As Integer
strMonthYear = Month(dte) & "/" & Year(dte)
dteFirstMonth = "01" & "/" & strMonthYear
intDayFirstOfMonth = WeekDay(dteFirstMonth, vbMonday)
intDaysDiff = (dte - dteFirstMonth) + intDayFirstOfMonth - 1
WeekInMonth = Int(intDaysDiff / 7) + 1
End Function 29/09/2017, 13:54
serkan1985
Ozan bey fonksiyonu ekledim ama "DATE(WW)" sütununda nası tarihe göre atıycak tam anlayamadım. Örnek ekte yardımcı olabilirseniz çok sevinirim.
29/09/2017, 15:26
simendifer
1 2