Created
March 1, 2021 11:28
-
-
Save Alkimisti/6cae5b4f3689918fc153bda29f2b9827 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.sql.Timestamp; | |
import java.util.Date; | |
public class DateToTimestamp { | |
public static void main(String[] args) { | |
Date date = new Date(); | |
Timestamp ts = new Timestamp(date.getTime()); | |
System.out.println(ts); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment