Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Date myDate = new Date();
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd:HH-mm-ss");
- String myDateString = sdf.format(myDate);
- Date myDate = new Date();
- FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd:HH-mm-ss");
- String myDateString = fdf.format(myDate);
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd:HH-mm-ss");
- Date yourDate = sdf.parse("2008-09-18:22-03-15");
- Date d = new Date();
- String formatted = new SimpleDateFormat ("yyyy-MM-dd:HH-mm-ss").format (d);
- System.out.println (formatted);
- long timestamp = System.currentTimeMillis()
- final DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd:hh-mm-ss");
- formatter.format(new Date());
Add Comment
Please, Sign In to add comment