How to get current date time in vue js?

Hello Dev’s
Hope all are feeling okay. Today in this tutorial I will show you how to get current date time in vue js app. Do you want get current date time in your vue js app. If yes then I think you are in right place. I will help you to getting current datetime in your vue js app. If you know how to get current date by using javascript or jquery then you can also get same way by using Date Class. We can also display current date with by this yyyy-mm-dd format.

I hope it is a very simple and easy to get current datetime in vue js app. Because we can get it just by using Date() function. Date() function will provide us full date and time with the time zone. So we can also make it in better format as like yyyy-mm-dd.

Now in bellow I will give you very a small and simple example. Now you can easily understand how can we display current date with time in vue js app.


<!DOCTYPE html>
    <title>How to get current date time in vue js? -</title>
    <script src=""></script>
<div id="app">
    {{ message }}
<script type="text/javascript">
 new Vue({
    el: '#app',
    data: { 
          message:"Welcome, Please Wait...."
        callFunction: function () {
            var currentDate = new Date();
            var currentDateWithFormat = new Date().toJSON().slice(0,10).replace(/-/g,'/');
    mounted () {

Read Also : How to Install Vue JS in Laravel 8 ?

thanks for reading. I hope it will help you. Also you can follow us on Facebook


About Shahriar Sagor

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by Shahriar Sagor →