Skip to content

Instantly share code, notes, and snippets.

@mustafasevgi
Created February 23, 2015 19:21
Show Gist options
  • Save mustafasevgi/ba0ac3eb11f0a6e5e970 to your computer and use it in GitHub Desktop.
Save mustafasevgi/ba0ac3eb11f0a6e5e970 to your computer and use it in GitHub Desktop.
get hour 24 hours format
Date now = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("K:mm a");
String formattedTime = sdf.format(now);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment