Skip to content

Instantly share code, notes, and snippets.

@clcneogeek325
Created October 11, 2018 18:34
Show Gist options
  • Save clcneogeek325/622194c939fc6f76deae15eca994faf7 to your computer and use it in GitHub Desktop.
Save clcneogeek325/622194c939fc6f76deae15eca994faf7 to your computer and use it in GitHub Desktop.
import java.util.Date;
import java.text.SimpleDateFormat;
public class DateDemo {
public static void main(String args[]) {
Date dNow = new Date( );
SimpleDateFormat ft =
new SimpleDateFormat ("yyyy.MM.dd_hh.mm.ss");
String nombre_archivo = "archivos_" + ft.format(dNow)+".zip";
System.out.println(nombre_archivo);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment