Skip to content

Instantly share code, notes, and snippets.

@clcneogeek325
Created October 11, 2018 18:34

Revisions

  1. NEO created this gist Oct 11, 2018.
    15 changes: 15 additions & 0 deletions date_time.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    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);
    }
    }