Home
Insert
Update snippet 'Parse UNIX time stamp'
Title
Description
Parses UNIX time stamp into DateTime (as returned for example by the OpenWeatherMap API)
Source code
open System let toDateTime (timestamp:int) = let start = DateTime(1970,1,1,0,0,0,DateTimeKind.Utc) start.AddSeconds(float timestamp).ToLocalTime()
Tags
datetime
datetime
Author
Link
Reference NuGet packages
If your snippet has external dependencies, enter the names of NuGet packages to reference, separated by a comma (
#r
directives are not required).
Update