Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to get the current date and time in javascript

// Getting date and time with javascript 
// example: 1/11/2021 1:34:29

var currentdate = new Date();
var datetime = currentdate.getDay() + "/" + currentdate.getMonth() 
+ "/" + currentdate.getFullYear() + " " 
+ currentdate.getHours() + ":" 
+ currentdate.getMinutes() + ":" + currentdate.getSeconds();

Comment

how to get a due date from current date in javascript

var currentDate = new Date();
// to add 6 days to current date
var duedate = currentDate.addDays(6);
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript get content of input 
Javascript :: javascript https post 
Javascript :: .foreach in javascript 
Javascript :: redux mapstatetoprops get props 
Javascript :: moment to date object 
Javascript :: currentTime(); javascript 
Javascript :: learn mongodb 
Javascript :: javascript catch specific error 
Javascript :: for:each in lwc js 
Javascript :: jquery fadein to show modal 
Javascript :: abrir dialog angular materia 
Javascript :: pm2 config changes update environments 
Javascript :: add in to array mongoose 
Javascript :: javascript on scroll change nav color 
Javascript :: javascript deconstruct object 
Javascript :: regex scan youtube video id 
Javascript :: axios all methods 
Javascript :: javascript add dom disabled 
Javascript :: sum of all elements in array javascript 
Javascript :: how to cut off decimals in javascript 
Javascript :: javascript jquery map a range of numbers 
Javascript :: string.fromcharcode 
Javascript :: declaring constant in jsx 
Javascript :: javascript await return value 
Javascript :: apollo clear cache for query 
Javascript :: javascript map to object 
Javascript :: pass param to url retrofit 
Javascript :: toastify react not working 
Javascript :: splice from array javascript to remove 
Javascript :: jest spyon 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =