Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

new date in interpolation angular

// create a method in .ts file
convertDate(date){
  return new Date(date+' UTC');//convert UTC time to Local time
}

//call the above function from .html file
{{convertDate(item.CreatedOn) | date:'medium'}}
 
PREVIOUS NEXT
Tagged: #date #interpolation #angular
ADD COMMENT
Topic
Name
5+4 =