What A Life Jun 20, 2019 What a life indeed. Each of us come into this world to try and figure out things. Life has a way to make us think and consider whatever is going on, it must find a way to allow us to figure it all out. We don’t always figure things out of course, that’s not how this life always works. It comes and goes long before we even have a chance to attempt any of it. Talk about a twist that just doesn’t make sense.
For some reason my installation of Java wouldn't let me use SimpleDateFormat to format my dates. So I had to google a different way to do this and found the following works as well. The Date class has a bunch of issues with it to begin with, so this is much cleaner and better as well.
LocalDateTime ldt = LocalDateTime.now();
DateTimeFormatter df = DateTimeFormatter.ofPattern("MM/dd/yyyy", Locale.ENGLISH);
String formattedString = df.format(ldt);
Comments
Post a Comment