Use SimpleDateFormatter for Date and Text Conversion

Use SimpleDateFormatter for Date and Text Conversion

The following code shows you how to use SimpleDateFormatter for date and text conversion:

java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("EEE MMM d hh:mm:ss yyyy");		java.util.Date date1 = null;try{   date1 = formatter.parse("Thu Jun 3 09:09:30 2004");}catch(Exception e){   e.printStackTrace();}System.out.println("Date1 in millis : " + date1.getTime());System.out.println("Date1 in string : " + date1);java.util.Date date2 = new java.util.Date(date1.getTime());System.out.println("Date2 in string : " + date2);
Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular