The following function expects a
UnixTimeWiki as integer and returns the converted date as a string.
GeSHi (vbnet):
Private Function UnixTimeToString(ByVal Timestamp As Integer) As String
' init new date with unix epoche 1.1.1980:00:00:00
Dim dateTime As New Date(1970, 1, 1, 0, 0, 0, 0)
' add the timestamp
dateTime = dateTime.AddSeconds(Timestamp)
' create a new strig representing the unixtime
Dim uDate As String = dateTime.ToShortDateString() + ", " + dateTime.ToShortTimeString()
' return the string
Return uDate
End Function
Created by GeSHI 1.0.7.20