javascript - get current time as PT08H10M00S -


how can convert current time in format pt08h10m00s. use odata service communication , expects time in format pt08h10m00s 8:10:00 in time. there inbuild js function same.

if pt dynamic can add code derive @ runtime how ever want

var d = new date(); var customdate= 'pt'+ d.gethours()+'h'+d.getminutes()+'m'+d.getseconds()+'s'; console.log(customdate); 

Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -