
CodePudding user response:
Var hours='22:17:33';//timeVar date=new date (' 1970-01-01 '+ hours);//into the date, need to increase the default date 1970-01-01
Var timespan=date. GetTime ()//get the current date timestamp
Var date1=new Date (timespan)//timestamp value Date is 1970-01-01 22:17:33
Var dt=date1. GetHours () + ', '+ date1. GetMinutes () +', '+ date1. GetSeconds 22:17:33 ()//get the date time value