Solved Convert UNIX timestamp to DateTime

#1
Hi,
Does anyone know how to convert a UNIX timestamp to a DateTime in Blue Prism? A UNIX timestamp is the number of seconds since 1/1/1970, and looks something like this: 1612344495790, which should convert to 2/3/2021 09:28:15 GMT.

Thank you.
 
#2
Hi,
Does anyone know how to convert a UNIX timestamp to a DateTime in Blue Prism? A UNIX timestamp is the number of seconds since 1/1/1970, and looks something like this: 1612344495790, which should convert to 2/3/2021 09:28:15 GMT.

Thank you.
VB.Net Code:
INPUT : UnixTime (text)
OUTPUT : ConvertedDateTime (text)

Dim t As New DateTime
t = DateTime.Parse("January 1 1970 12:00:00 am")
ConvertedDateTime = t.AddSeconds(UnixTime/1000).ToString
 
#3
VB.Net Code:
INPUT : UnixTime (text)
OUTPUT : ConvertedDateTime (text)

Dim t As New DateTime
t = DateTime.Parse("January 1 1970 12:00:00 am")
ConvertedDateTime = t.AddSeconds(UnixTime/1000).ToString
This is just what I was looking for, and it works perfectly. Thank you, sahil_raina!
 
Top