Im trying to create a chat application (mobile app). When i press send button i need to set the time at the moment to a textview
You just have to get the current Date and time from system and then display on your textview. Try this -
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
your_textView.setText(dateFormat.format(new Date());