'************************************** ' Name: Unix TimeStamp Dword32 Convert ' Description:Number dword (UNIX TimeSta ' mp) convert to standard format time & da ' te. Include fix error number 6 (overflow) when entering a larger date as 2038/19/01 aka "Y2K38" "Y2K+38" "Y2.038K" and constantly adheres to dword format. The 32bit value is used from a negative number. Have a nice day :: RIDENTEM DICERE VERUM QUID VETAT? :: ' By: Thmsz23 ' ' ' Inputs:None ' ' Returns:None ' 'Assumes:None ' 'Side Effects:None '************************************** Option Explicit Private Function Date2UnixDword(ByVal Zadej_DATETIME As String) As String Dim temp As String temp = Zadej_DATETIME If temp > "19.01.2038 03:14:07" Then Date2UnixDword = DateDiff("s", "19.01.2038 03:14:07", temp) Or &H80000000 Else Date2UnixDword = DateDiff("s", "01.01.1970 00:00:00", temp) End If Date2UnixDword = Format$(Date2UnixDword, "0000000000") End Function Private Function UnixDword2Date(ByVal Zadej_DWORD As Long) As String Dim temp As Double temp = CDbl(Zadej_DWORD And &H7FFFFFFF) If Zadej_DWORD < 0 Then UnixDword2Date = DateAdd("s", temp, "19.01.2038 03:14:07") Else UnixDword2Date = Format$(DateAdd("s", temp, "01.01.1970 00:00:00"), "dd.mm.yyyy hh:mm:ss") End If End Function Private Sub cmdDecode_Click() With Me .txtText4.Text = UnixDword2Date(.txtText1.Text) End With End Sub Private Sub cmdCode_Click() With Me .txtText2.Text = Date2UnixDword(.txtText4.Text) End With End Sub