Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

last modified date after edit function

I want to display a "Last modified time" in my javascript table. I have searched a lot on date time but I can only find the last modified time on the document. I have some variables in my table (see below question). What i want to do is display the date after i was modified that variable. Can anyone help me ? 🙂

The table what im using with javascript.
`

if(response.length > 0)
{
    for (var count = 0;count < response.length; count++)
    {
        html += '<tr>';
        html += '<td>' +response[count].id+'</td>';
        html += '<td>€'+response[count].inkoopprijs+'</td>';
        html += '<td>€'+response[count].verkoopprijs+'</td>';
        html += '<td>' +response[count].producten+'</td>';
        html += '<td>' +response[count].create_date+'</td>';
        html += '<td>' +response[count].last_modified+'</td>';
        html += '<td><a href="../prijswijzigen.php?edit='+response[count].id+'" class="edit_btn">Edit</td>';
        html += '<td><a onclick="return confirm()" href="crud.php?del='+response[count].id+'" class="del_btn">Delete</td>';
        html += '</tr>';
        serial_no++;
    }
}

`

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

        html += '<td>' +response[count].last_modified+'</td>';

That line is for my variable last modified that is the same as my create_date variable.

The DOM lastModified property in HTML. That displayed the time of the last time i modified the file.

>Solution :

new Date().toLocaleDateString()

is that what you need?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading