javascript date to utc format
new Date().toISOString()
> '2012-11-04T14:51:06.157Z'
javascript date to utc format
new Date().toISOString()
> '2012-11-04T14:51:06.157Z'
convert utc to date javascript
var UTCdate = new Date('4/29/2021 3:22:46 PM UTC');
var onlyDate = UTCdate.getDate();
console.log(onlyDate); //Gives 29
//Please don't forget to upvote if this answer helped you ! Have a nice day !!
convert timestamp to utc javascript
function utcformat(d){
d= new Date(d);
var tail= 'GMT', D= [d.getUTCFullYear(), d.getUTCMonth()+1, d.getUTCDate()],
T= [d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds()];
if(+T[0]> 12){
T[0]-= 12;
tail= ' pm '+tail;
}
else tail= ' am '+tail;
var i= 3;
while(i){
--i;
if(D[i]<10) D[i]= '0'+D[i];
if(T[i]<10) T[i]= '0'+T[i];
}
return D.join('/')+' '+T.join(':')+ tail;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us