Nilai tanggal awal dari bulan

Public Function FirstOfMonth(ByVal xDate As Date) As Date FirstOfMonth = DateSerial(Year(xDate), Month(xDate), 1) End Function

Nilai tanggal akhir dari satu bulan

Public Function EndOfMonth(ByVal xDate As Date) As Date EndOfMonth = DateSerial(Year(xDate), Month(xDate) + 1, 0) End Function

Nilai tanggal akhir dari satu minggu

Public Function EndOfWeek(ByVal xDate As Date) As Date EndOfWeek = xDate – Weekday(xDate) + 7 End Function

Ikuti

Get every new post delivered to your Inbox.