Skip to content

Instantly share code, notes, and snippets.

@harsh1772
Created June 10, 2022 06:54
Show Gist options
  • Save harsh1772/9042e84a92e77e9f1c562835538e4a52 to your computer and use it in GitHub Desktop.
Save harsh1772/9042e84a92e77e9f1c562835538e4a52 to your computer and use it in GitHub Desktop.
add date in milliseconds
-------------------------
added_on = DateTime.now().millisecondsSinceEpoch.toString();
get date in milliseconds
-------------------------
DateTime.fromMillisecondsSinceEpoch(1625879685158,
isUtc: true)
.toString()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment