Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 9, 2019 01:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save parzibyte/013ffeeff3e0526c83753c25a946adc2 to your computer and use it in GitHub Desktop.
public static String obtenerFechaYHoraActual() {
String formato = "yyyy-MM-dd HH:mm:ss";
DateTimeFormatter formateador = DateTimeFormatter.ofPattern(formato);
LocalDateTime ahora = LocalDateTime.now();
return formateador.format(ahora);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment