Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery code to insert current date time in to database

Tags:

jquery

am new to Jquery. I want to insert current date time to Db

var data{
"id":1,
 "name":"mybane",
"datetime":// here i have to put current date time
}

is there any possible way to get the current date time..

like image 883
Psl Avatar asked Dec 25 '22 20:12

Psl


1 Answers

Use this:

var data{
"id":1,
 "name":"mybane",
"datetime":new Date(),
}

Reference: How do I get the current date in JavaScript?

like image 124
Code Lღver Avatar answered Jan 11 '23 16:01

Code Lღver