Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Natie Rautenbach
Added: Dec 6, 2018 7:36 AM
Views: 3
Tags: js time
  1. var dt = new Date();
  2. var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
  3. console.log(time);