I want to get the current timestamp like that : 1320917972
int time = (int) (System.currentTimeMillis()); Timestamp tsTemp = new Timestamp(t
You can use the SimpleDateFormat class:
SimpleDateFormat s = new SimpleDateFormat("ddMMyyyyhhmmss"); String format = s.format(new Date());