Java Today getTodayString()

Here you can find the source of getTodayString()

Description

return a string of todays date suitable for use in a file name

License

Apache License

Declaration

public static String getTodayString() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.*;
import java.util.*;

public class Main {
    /**/*from  www . j  a  v  a 2  s  .c  o  m*/
     * return a string of todays date suitable for use in a file name
     *
     * @return
     */
    public static String getTodayString() {
        SimpleDateFormat sdf = new SimpleDateFormat("dd_MMM_yyyy"); // ->  05:08:56 AM
        final String dateText = sdf.format(new Date());
        return dateText;
    }
}

Related

  1. getTodayStr()
  2. getTodayStr()
  3. getTodayString()
  4. getTodayString()
  5. getTodayString()
  6. getTodayTime()
  7. getTodayTimeForDB()
  8. getTodayWithTime(final String iTime)
  9. getTodayYMD()