I want to convert a date string to unix timestamp from a date string e.g. 14-02-2018
14-02-2018
Can someone help?
use this to convert the date string to UNIX timestamp
val date = SimpleDateFormat("dd-MM-yyyy").parse("14-02-2018") println(date.time)
In JavaScript, how can I format a date object to print as 10-Aug-2010?
How can I get a timestamp in JavaScript? Something similar to Unix timestamp, that is, a single number that represents the current time and date. Either as a number or a string.
How do I get current date in JavaScript?