There Should Be Space Wed Feb 12 20:54:57 MST 2020 There should be space where nothing makes sense and that’s okay with everyone. There should be a place where absolutely nothing matters, and we don’t have a clue what’s going on, but again it doesn’t matter…so we survive. Things like that. Isn’t that okay? Isn’t that what this life should be about? Something like that.
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