Answers for "how to change date to timestamp in java"

1

localdate to timestamp in java

Timestamp timestamp = Timestamp.valueOf(localDate.atStartOfDay());
Posted by: Guest on December-14-2020
-1

date to timestamp java

All you need to do is change the string within the java.text.SimpleDateFormat constructor to: "MM-dd-yyyy HH:mm:ss".

Just use the appropriate letters to build the above string to match your input date.
Posted by: Guest on March-05-2021

Code answers related to "how to change date to timestamp in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language