Mega Code Archive

 
Categories / Java Tutorial / Development
 

New SimpleDateFormat(hh

import java.text.Format; import java.text.SimpleDateFormat; import java.util.Date; public class Main {   public static void main(String[] argv) throws Exception {     Format formatter = new SimpleDateFormat("HH:mm:ss Z");     Date date = (Date) formatter.parseObject("22:14:02 -0500");     System.out.println(date);   } }