Tutorialsplane

Vue.Js get current timestamp


We can use Date().getTime() method to get the current timestamp in vue.js. Here in this tutorial, we are going to explain how you can get current timestamp in UNIX. You can also use our online editor to edit and run the code online.


Vue.Js get current timestamp Example

You can get current UNIX timestamp in Vue.js simply as below-

Example:

<div id="app">
	<p>Result = {{result}}</p>
	<button>Click Me</button>
</div>
 

Try it ยป

Output of above example-