You can change it to ISO_DATE_TIME
which gives you the “T”
DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE_TIME;
LocalDateTime timeStamp= LocalDateTime.parse(LocalDateTime.now().toString(),formatter);
System.out.println(timeStamp);
More Related Contents:
- PermGen elimination in JDK 8
- Is method reference caching a good idea in Java 8?
- Java 8: Lambda-Streams, Filter by Method with Exception
- UnsupportedTemporalTypeException when formatting Instant to String
- How to convert a Java 8 Stream to an Array?
- How to sum a list of integers with java streams?
- Why does Stream not implement Iterable?
- How can I create a stream from an array?
- In Java 8, is there a ByteStream class?
- LambdaConversionException with generics: JVM bug?
- Sum values from specific field of the objects in a list
- How do I define a method which takes a lambda as a parameter in Java 8?
- What’s the difference between instance method reference types in Java 8?
- functional interface that takes nothing and returns nothing [duplicate]
- Why are Java 8 lambdas invoked using invokedynamic?
- Why do Consumers accept lambdas with statement bodies but not expression bodies?
- Formatting a Duration in Java 8 / jsr310
- Most efficient way to get the last element of a stream
- Why does findFirst() throw a NullPointerException if the first element it finds is null?
- Java 8 Stream IllegalStateException: Stream has already been operated on or closed
- How to sum values in a Map with a stream?
- Java access bean methods with LambdaMetafactory
- Why can we use ‘this’ as an instance method parameter?
- When and why would you use Java’s Supplier and Consumer interfaces?
- What kind of List does Collectors.toList() return?
- Implied anonymous types inside lambdas
- Spring + AspectJ weaving for java 8 using aspectj-maven-plugin
- Visualization of Java Stream parallelization
- Why does a Java Lambda which throws a Runtime Exception require brackets?
- Java 8 Supplier Exception handling with CompletableFuture