Standard
Java SimpleDateFormat – Formatting Dates
- Lucas
- August 08, 2015
SimpleDateFormat is a Java class that allows you to format dates. Converting dates in en-US (United States) format to pt-BR (Brazilian) format: package com.masterdaweb.blog; import java.text.ParseException; import java.text.SimpleDateFormat; public class Tutorial { public static void main(String[] args) throws ParseException { String usDate = “1992-08-25 13:30”; SimpleDateFormat brFormat = new SimpleDateFormat(“dd-MM-yyyy HH:mm”); SimpleDateFormat usFormat