Return a date from seconds or milliseconds