(Новая страница: «Function Epoch2Date(lngDate As Long) As Date ' Set your timezone here timeZoneOffset = 2 ' EET 'transfer to date Epoch2Date = (lngDate + 60 * 60 *…»)
(нет различий)
Текущая версия на 11:04, 12 апреля 2018
Function Epoch2Date(lngDate As Long) As Date
' Set your timezone here
timeZoneOffset = 2 ' EET
'transfer to date
Epoch2Date = (lngDate + 60 * 60 * timeZoneOffset) / 86400# + #1/1/70#
'check if it is summer time
If IsDST(Epoch2Date) = False Then
'here you can use diferent values depend on time zone
Epoch2Date = Epoch2Date
Else
Epoch2Date = Epoch2Date + 1 / 24
End If