Translations:Пример доступа к данным из Excel/20/en — различия между версиями

Материал из WebHMI Wiki
Перейти к: навигация, поиск
(Новая страница: «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

Информация о сообщении (править)
Это сообщение не имеет описания. Если вы знаете, где или как это сообщение используется, то можете помочь другим переводчикам, добавив к нему описание.
Формулировка сообщения (Пример доступа к данным из Excel)
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
End Function
Перевод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
End Function

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

End Function