Asked By
John L Krug
10 points
N/A
Posted on - 03/08/2013
Hi everyone, I am using Java software. But I am facing a problem of using the Java date mask. For programming the date, I need it. Please give me some tips about it.
Problem with Java date mask
Â
Hello
Â
You can use this example as refferece:
Â
import java.text.*;
public class Test
{
Â
  public static void main(String args[])
  {
  try
  {
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-DD");
  System.out.println(sdf.parse(args[0]).toString());
  }
        catch(Exception e)
  {
  e.printStackTrace();
  }
  }
}
You can change date format as you need. This is simple example. I hope I helped. Regards.
Â