Commit ceda30f28f60924072691ba519d00af3c5eecaa0
1 parent
64aec48c
Exists in
master
Pegar a data atual
Showing
1 changed file
with
14 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,14 @@ |
1 | +package br.com.util; | |
2 | + | |
3 | +import java.text.DateFormat; | |
4 | +import java.text.SimpleDateFormat; | |
5 | +import java.util.Date; | |
6 | + | |
7 | +public class DateUtil { | |
8 | + | |
9 | + public static String dataHoraAtual() { | |
10 | + DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); | |
11 | + return dateFormat.format(new Date()); | |
12 | +} | |
13 | + | |
14 | +} | ... | ... |