Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

dateTime to date in js

let dateStr =new Date("Wed Aug 05 18:11:48 UTC 2020")

dateStr.toLocaleDateString()
// "05/08/2020"

dateStr.toTimeString()
// "23:41:48 GMT+0530 (India Standard Time)"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dateTime #date #js
ADD COMMENT
Topic
Name
9+4 =