Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript

<?php
    //MYSQL DATE FORMAT
    $updated_date = '2021-01-28 11:52:19';

    $new_datetime = new DateTime($updated_date);
    $final_date = $new_datetime->format('Y-m-dTH:i:sP');

    echo $final_date; //2021-01-28T11:52:19+01:00
?>
Source by devsheet.com #
 
PREVIOUS NEXT
Tagged: #javascript
ADD COMMENT
Topic
Name
1+6 =