date - Convert timestamp to datetime in erlang -
How do I change a timestamp (the number of milliseconds 1 January 1970) in date or date format in Erlang? Something like this {year, month, day}
Broadly:
MSDod (miliseconds) - & gt; ; Baset = Calendar: datetime_to_gregorian_seconds ({{1970,1,1}, {0,0,0}}, seconds = basedate + (milliseconds div 1000), {date, _Time} = calendar: gregorian_second_t_ttime (second), date.
Comments
Post a Comment