Convert epoch time to date time

I need to pull out the epoch time from this file name MyProfileData1652263200006.xlsx
, convert it to a readable date time format, and make it into a variable.

I am pretty sure I could figure out how to parse out the numbers with regex but have no idea how to convert the number.

Can you check following?
grafik

Thank you Peter. I will give this a try after my current automation ends. I appreciate it!

Perfect

we would also recommend regex for the extraction

the String, number, date conversion would look like below:
grafik
DateTimeOffset.FromUnixTimeMilliseconds(CLng(strNumberVar))

That worked really well Peter. Is there a simple way inside that command to only show the date and time? I don’t really need the +00:00

Either way it is super helpful. Thank you so much!

we can control a formated string of date and time like:
grafik

1 Like

Perfect! Thank you again!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.