Answers for "vuejs date to timestamp"

PHP
0

vue print date

import moment from 'moment'

Vue.filter('formatDate', function(value) {
  if (value) {
    return moment(String(value)).format('MM/DD/YYYY hh:mm')
  }
}
Posted by: Guest on April-29-2020
3

datetime to date javascript

var currentDate = new Date();

var date = currentDate.getDate();
var month = currentDate.getMonth(); //Be careful! January is 0 not 1
var year = currentDate.getFullYear();

var dateString = date + "-" +(month + 1) + "-" + year;
Posted by: Guest on April-16-2020
0

php date object to timestamp

$date = new DateTime();
echo $date->getTimestamp();
Posted by: Guest on June-28-2019

Browse Popular Code Answers by Language