Feeds:
Tulisan
Komentar

Tulisan terkirim dikaitan (tagged) ‘hari pasaran’

Cara menentukan hari pada excel

untuk menampilkan hari dan pasaran dari tanggal tertentu di excel dapat di copy data vb berikut :

Function Hari(ByVal Tgl As Date) As String
Hari = Choose(Weekday(Tgl), _
“Minggu”, “Senin”, “Selasa”, _
“Rabu”, “Kamis”, “Jum’at”, “Sabtu”)
End Function
Function Pasaran(ByVal Tgl As Date) As String
Dim l
Dim s
Dim InitialDate As Date

InitialDate = DateValue(“02/01/1970″)
l = DateDiff(“s”, InitialDate, Tgl) * 1000
s = l + 86400000
s = s / 432000000
s = Round((s – Int(s)) * 10) / 2
l = Abs(Round(s))
If l > 4 Then l = 0
Pasaran = Choose(l + 1, _
“Wage”, “Kliwon”, “Legi”, _
“Pahing”, “Pon”)
End Function

semoga bermanfaat

Read Full Post »

Ikuti

Get every new post delivered to your Inbox.

Bergabunglah dengan 202 pengikut lainnya.