Jq, get rid of the last ten

the following is a circular list of data requested by ajax. The print of"+ data [I] .createTime +"in li is 2019-02-26 15:15:51. How to remove the following 15:15:51 minutes

    for(var i=0;i<6;iPP){
        var tbBody = "";
        tbBody += "<li>"+data[i].createTime+"</li>"        
    }
Jul.14,2022

The problem of

seemingly not using jq
is actually a string interception problem: how to turn 2019-02-26 15:15:51 into 2019-02-26
there are really too many methods.

clipboard.png

const str = '2019-02-26 15:15:51'
console.log(str.split(' ')[0])
console.log(str.substring(0, 10))
console.log(str.match(/\d{4}-\d{2}-\d{2}/)[0])

if it helps you, please upvote or adopt ~


data [I] .createTime.slice (0Magne10)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e65167-45ada.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e65167-45ada.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?