Home > database >  At the request of the general time front page format is different object and time display format, th
At the request of the general time front page format is different object and time display format, th

Time:04-15

At the request of the front page of the general time format is different object and time display format, new Date () in the default page displayed as Mon Jan 04 14:25:04 2021 GMT + how do I find Canada 28 group of 0800 (China standard time), it does not fit our Chinese way of reading time, we usually get used to the 2020-01-04 14; 25:04 such way of reading, and summarizes several time formatting objects.

Methods 1 string concatenation
Var date=new date ();
Var STR=date. GetFullYear () + '-' + (date, getMonth () + 1) + '-' + date. The getDate () + "+ date. GetHours () +" : "+ date. GetMinutes () +" : "+ date. GetSeconds ();
1
2

CodePudding user response:

Oh

CodePudding user response:

General data is not on the front end, but rather in the back-end database server,

How to display, in the back-end application can set, can use json or other way, is basically a string,

Front end that you deal with it, of course,
  • Related