Single line to do this one: –
Int32 unix = (Int32)(startTime.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
Takes the date and removes the number of seconds that have passed since 1/1/1970
Single line to do this one: –
Int32 unix = (Int32)(startTime.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
Takes the date and removes the number of seconds that have passed since 1/1/1970